create or replace procedure proc_sms_2 as
cnt number;
ncnt number;
pcnt number;
beginselect cnt into cnt,ncnt into ncnt,pcnt into pcnt from
(select count(distinct t1.msgid) cnt from SMSC_MSGDOWNINTER t1,sms_msgbachsendtype t2,sms_msgbatchsendlogmain t3
where to_char(t1.SENDTIME,'MON') = to_char(sysdate,'MON') and t1.orgid = t2.orgid
and t2.batchsendid = t3.batchsendid and to_char(sysdate,'yyyymmddhh24mi') = '200903082209') x,
(select count(t5.msglogdetailid) ncnt from sms_msgbatchsendlogmain t4,sms_msgbatchsendlogdetail t5
where t4.subscribeid = t5.subscribeid and to_char(sysdate,'yyyymmddhh24mi') = '200903082209') y,
(select t6.paramvalue pcnt from sys_sysparam t6 where t6.paramcode ='105') z;if cnt>0 and (cnt+ncnt)<=pcnt then
insert into SMSC_MSGDOWNINTER(MSGID,MOBILEPHONE,MSGCONTENT,SENDTIME,USERID,ORGID,APPCODE)
select SEQ_SMSC_MSGDOWNINTER.nextval,S3.MOBILEPHONE,cast(S2.CONTENT as varchar(1000)),S2.SENDPOINT,S1.USERID,S1.ORGID,'qq'
from SMS_MSGBACHSENDTYPE S1,SMS_MSGBATCHSENDLOGMAIN S2,SMS_MSGBATCHSENDLOGDETAIL S3
where 1=1
and S1.BATCHSENDID = S2.BATCHSENDID
and S2.SUBSCRIBEID = S3.SUBSCRIBEID
and to_char(sysdate,'yyyymmddhh24mi') = to_char(S2.Sendpoint,'yyyymmddhh24mi');
commit;
end if;
end;请问这里哪里错啊,select cnt into cnt,ncnt into ncnt,pcnt into pcnt from;Compilation errors for PROCEDURE JSTMIIUSER.PROC_SMS_2
Error: PL/SQL: ORA-00923: 未找到要求的 FROM 关键字
Line: 7
Text: select cnt into cnt,ncnt into ncnt,pcnt into pcnt fromError: PL/SQL: SQL Statement ignored
Line: 7
Text: select cnt into cnt,ncnt into ncnt,pcnt into pcnt from如果我将它改为:select cnt into cnt from,将三个into改为一个into它就不报错了,为什么啊?请高手指点..
cnt number;
ncnt number;
pcnt number;
beginselect cnt into cnt,ncnt into ncnt,pcnt into pcnt from
(select count(distinct t1.msgid) cnt from SMSC_MSGDOWNINTER t1,sms_msgbachsendtype t2,sms_msgbatchsendlogmain t3
where to_char(t1.SENDTIME,'MON') = to_char(sysdate,'MON') and t1.orgid = t2.orgid
and t2.batchsendid = t3.batchsendid and to_char(sysdate,'yyyymmddhh24mi') = '200903082209') x,
(select count(t5.msglogdetailid) ncnt from sms_msgbatchsendlogmain t4,sms_msgbatchsendlogdetail t5
where t4.subscribeid = t5.subscribeid and to_char(sysdate,'yyyymmddhh24mi') = '200903082209') y,
(select t6.paramvalue pcnt from sys_sysparam t6 where t6.paramcode ='105') z;if cnt>0 and (cnt+ncnt)<=pcnt then
insert into SMSC_MSGDOWNINTER(MSGID,MOBILEPHONE,MSGCONTENT,SENDTIME,USERID,ORGID,APPCODE)
select SEQ_SMSC_MSGDOWNINTER.nextval,S3.MOBILEPHONE,cast(S2.CONTENT as varchar(1000)),S2.SENDPOINT,S1.USERID,S1.ORGID,'qq'
from SMS_MSGBACHSENDTYPE S1,SMS_MSGBATCHSENDLOGMAIN S2,SMS_MSGBATCHSENDLOGDETAIL S3
where 1=1
and S1.BATCHSENDID = S2.BATCHSENDID
and S2.SUBSCRIBEID = S3.SUBSCRIBEID
and to_char(sysdate,'yyyymmddhh24mi') = to_char(S2.Sendpoint,'yyyymmddhh24mi');
commit;
end if;
end;请问这里哪里错啊,select cnt into cnt,ncnt into ncnt,pcnt into pcnt from;Compilation errors for PROCEDURE JSTMIIUSER.PROC_SMS_2
Error: PL/SQL: ORA-00923: 未找到要求的 FROM 关键字
Line: 7
Text: select cnt into cnt,ncnt into ncnt,pcnt into pcnt fromError: PL/SQL: SQL Statement ignored
Line: 7
Text: select cnt into cnt,ncnt into ncnt,pcnt into pcnt from如果我将它改为:select cnt into cnt from,将三个into改为一个into它就不报错了,为什么啊?请高手指点..
解决方案 »
- oracle10g isqlplus
- 如何记录所有执行过的Sql语句
- 求向一个字段不确定的表插入数据的存储过程的写法
- 请教sqlldr导入定长文件的一个问题
- 关于webservice访问oracle存储过程问题
- 有没有方法不指定用户名阿??
- 为什么不能执行数据库的操作
- 在线求救,Oracle数据库里分组后想查询每组里的某条记录怎么办?
- 哪里有比较完整的sql server与oracle的sql语法比较?
- oracle11g无法与客户端oracle sql developer、java程序代码相连,但sqlplus可以正常使用。
- 设置 font.properties.zh.5.0 的字体
- Oracle9i全文检索的分词问题?
select col1,col2,col3 into a,b,c from t
这行代码有问题,不能这样写啊,什么有几个into;只要一个就行了改:
select cnt,ncnt,pcnt into cnt,ncnt,pcnt from .....