解决方案 »
- 为什么这个语句会提示不是GROUP BY 表达式
- 请教在Oracle8.17中修改字符集的方法?
- 有oracle9i for solaris x86这个版本吗?
- 如何将SQL SERVER中的一个表的内容插入到ORACLE的表中(用SQL 语句)?特急,请高手帮帮忙。
- 执行系统触发器时,为什么提示这个表或视图不存在?
- 关于SEQUENCE的一个问题
- ***我新建了一个数据库test,又配置了一个监听服务testlistener,端口都设为1522,可是连不上是怎么回事?总是报错:TNS:没有监听器***
- 数据库遭到毁灭性毁坏,急需恢复!!!
- 在存储过程中定义光标,可以直接用存储过程的入口参数吗?见内容
- oracle10g rac中的节点上crs无法启动
- oracle 10g em通过浏览器无法访问。
- 设置事务的隔离级别本质上是不是就是启动了oracle默认的封锁机制?
估计是sql语句错误……
select AA.XXCODE, AA.xcode, AA.xname, AA.mobile, AA.CARD_ID
from (select iccard_familyinfo.xxcode,
iccard_familyinfo.xcode,
iccard_familyinfo.xname,
iccard_familyinfo.mobile,
iccard_card_student.card_id
from iccard_card_student
inner join iccard_familyinfo on iccard_card_student.xxcode =
iccard_familyinfo.xxcode
and iccard_card_student.xcode =
iccard_familyinfo.xcode
where iccard_familyinfo.xxcode in
(select xxcode from iccard_limit)) AA
left join (select iccard_safearrive_4mulcheck.xxcode,
xcode,
checktime,
iccard_safearrive_4mulcheck.regid,
re,
regularflag
from iccard_safearrive_4mulcheck
inner join iccard_school_setting on iccard_safearrive_4mulcheck.regid =
iccard_school_setting.regid
and iccard_safearrive_4mulcheck.xxcode =
iccard_school_setting.xxcode) BB on AA.Xxcode =
BB.XXCODE
and AA.xcode =
BB.xcode
where (regid is null or regid in (97, 98, 99));
BEGIN
OPEN syn_cursor;
LOOP
FETCH syn_cursor
INTO vxxcode, vxcode, vxname, vmobile, vcard_id;
EXIT WHEN syn_cursor%NOTFOUND;
INSERT INTO iccard_stat_abstudent_new
(xxcode, xcode, xname, mobile, card_id,statdate)
values
(vxxcode, vxcode, vxname, vmobile, vcard_id,sysdate);
---发短信
INSERT INTO message_out
(xxcode,
xcode,
mobile,
msgtype,
optype,
msg,
sendtime,
creattime,
userid,
priority,
checkflag)
values(vxxcode,vxcode,vmobile,'09','21','...',sysdate,sysdate,'02','','');
commit;
END LOOP;
CLOSE syn_cursor;
vxxcode varchar2(50);
vxname varchar2(50);
vxcode varchar2(50);
vmobile varchar2(30);
vcard_id varchar2(30);if(to_number(to_char(sysdate ,'HH24')) < 9) then
begin
vcard_id := 1 ;
return ;
end ;
end if ; CURSOR syn_cursor IS
select AA.XXCODE, AA.xcode, AA.xname, AA.mobile, AA.CARD_ID
from (select iccard_familyinfo.xxcode,
iccard_familyinfo.xcode,
iccard_familyinfo.xname,
iccard_familyinfo.mobile,
iccard_card_student.card_id
from iccard_card_student
inner join iccard_familyinfo on iccard_card_student.xxcode =
iccard_familyinfo.xxcode
and iccard_card_student.xcode =
iccard_familyinfo.xcode
where iccard_familyinfo.xxcode in
(select xxcode from iccard_limit)) AA
left join (select iccard_safearrive_4mulcheck.xxcode,
xcode,
checktime,
iccard_safearrive_4mulcheck.regid,
re,
regularflag
from iccard_safearrive_4mulcheck
inner join iccard_school_setting on iccard_safearrive_4mulcheck.regid =
iccard_school_setting.regid
and iccard_safearrive_4mulcheck.xxcode =
iccard_school_setting.xxcode) BB on AA.Xxcode =
BB.XXCODE
and AA.xcode =
BB.xcode
where (regid is null or regid in (97, 98, 99));
BEGIN
OPEN syn_cursor;
LOOP
FETCH syn_cursor
INTO vxxcode, vxcode, vxname, vmobile, vcard_id;
EXIT WHEN syn_cursor%NOTFOUND;
INSERT INTO iccard_stat_abstudent_new
(xxcode, xcode, xname, mobile, card_id,statdate)
values
(vxxcode, vxcode, vxname, vmobile, vcard_id,sysdate);
---发短信
INSERT INTO message_out
(xxcode,
xcode,
mobile,
msgtype,
optype,
msg,
sendtime,
creattime,
userid,
priority,
checkflag)
values(vxxcode,vxcode,vmobile,'09','21','尊敬的家长,您的孩子'||vxname||'上午没有到校打卡。',sysdate,sysdate,'02','','');
commit;
END LOOP;
CLOSE syn_cursor;END iccard_info_check;
vxxcode varchar2(50);
vxname varchar2(50);
vxcode varchar2(50);
vmobile varchar2(30);
vcard_id varchar2(30);if(to_number(to_char(sysdate ,'HH24')) < 9) then
begin
vcard_id := 1 ;
return ;
end ;
end if ; CURSOR syn_cursor IS
select AA.XXCODE, AA.xcode, AA.xname, AA.mobile, AA.CARD_ID
from (select iccard_familyinfo.xxcode,
iccard_familyinfo.xcode,
iccard_familyinfo.xname,
iccard_familyinfo.mobile,
iccard_card_student.card_id
from iccard_card_student
inner join iccard_familyinfo on iccard_card_student.xxcode =
iccard_familyinfo.xxcode
and iccard_card_student.xcode =
iccard_familyinfo.xcode
where iccard_familyinfo.xxcode in
(select xxcode from iccard_limit)) AA
left join (select iccard_safearrive_4mulcheck.xxcode,
xcode,
checktime,
iccard_safearrive_4mulcheck.regid,
re,
regularflag
from iccard_safearrive_4mulcheck
inner join iccard_school_setting on iccard_safearrive_4mulcheck.regid =
iccard_school_setting.regid
and iccard_safearrive_4mulcheck.xxcode =
iccard_school_setting.xxcode) BB on AA.Xxcode =
BB.XXCODE
and AA.xcode =
BB.xcode
where (regid is null or regid in (97, 98, 99));
BEGIN
OPEN syn_cursor;
LOOP
FETCH syn_cursor
INTO vxxcode, vxcode, vxname, vmobile, vcard_id;
EXIT WHEN syn_cursor%NOTFOUND;
INSERT INTO iccard_stat_abstudent_new
(xxcode, xcode, xname, mobile, card_id,statdate)
values
(vxxcode, vxcode, vxname, vmobile, vcard_id,sysdate);
---发短信
INSERT INTO message_out
(xxcode,
xcode,
mobile,
msgtype,
optype,
msg,
sendtime,
creattime,
userid,
priority,
checkflag)
values(vxxcode,vxcode,vmobile,'09','21','尊敬的家长,您的孩子'||vxname||'上午没有到校打卡。',sysdate,sysdate,'02','','');
commit;
END LOOP;
CLOSE syn_cursor;END iccard_info_check;
CREATE OR REPLACE PROCEDURE iccard_info_check AS
vxxcode varchar2(50);
vxname varchar2(50);
vxcode varchar2(50);
vmobile varchar2(30);
vcard_id varchar2(30);if(to_number(to_char(sysdate ,'HH24')) < 9) then
begin
vcard_id := 1 ;
return ;
end ;
end if ; CURSOR syn_cursor IS
select AA.XXCODE, AA.xcode, AA.xname, AA.mobile, AA.CARD_ID
from (select iccard_familyinfo.xxcode,
iccard_familyinfo.xcode,
iccard_familyinfo.xname,
iccard_familyinfo.mobile,
iccard_card_student.card_id
from iccard_card_student
inner join iccard_familyinfo on iccard_card_student.xxcode =
iccard_familyinfo.xxcode
and iccard_card_student.xcode =
iccard_familyinfo.xcode
where iccard_familyinfo.xxcode in
(select xxcode from iccard_limit)) AA
left join (select iccard_safearrive_4mulcheck.xxcode,
xcode,
checktime,
iccard_safearrive_4mulcheck.regid,
re,
regularflag
from iccard_safearrive_4mulcheck
inner join iccard_school_setting on iccard_safearrive_4mulcheck.regid =
iccard_school_setting.regid
and iccard_safearrive_4mulcheck.xxcode =
iccard_school_setting.xxcode) BB on AA.Xxcode =
BB.XXCODE
and AA.xcode =
BB.xcode
where (regid is null or regid in (97, 98, 99));
BEGIN
OPEN syn_cursor;
LOOP
FETCH syn_cursor
INTO vxxcode, vxcode, vxname, vmobile, vcard_id;
EXIT WHEN syn_cursor%NOTFOUND;
INSERT INTO iccard_stat_abstudent_new
(xxcode, xcode, xname, mobile, card_id,statdate)
values
(vxxcode, vxcode, vxname, vmobile, vcard_id,sysdate);
---发短信
INSERT INTO message_out
(xxcode,
xcode,
mobile,
msgtype,
optype,
msg,
sendtime,
creattime,
userid,
priority,
checkflag)
values(vxxcode,vxcode,vmobile,'09','21','尊敬的家长,您的孩子'||vxname||'上午没有到校打卡。',sysdate,sysdate,'02','','');
commit;
END LOOP;
CLOSE syn_cursor;END iccard_info_check;
vxxcode varchar2(50);
vxname varchar2(50);
vxcode varchar2(50);
vmobile varchar2(30);
vcard_id varchar2(30);
/*--这里去掉,放到下面
if(to_number(to_char(sysdate ,'HH24')) < 9) then
begin
vcard_id := 1 ;
return ;
end ;
end if ;*/ CURSOR syn_cursor IS
select AA.XXCODE, AA.xcode, AA.xname, AA.mobile, AA.CARD_ID
from (select iccard_familyinfo.xxcode,
iccard_familyinfo.xcode,
iccard_familyinfo.xname,
iccard_familyinfo.mobile,
iccard_card_student.card_id
from iccard_card_student
inner join iccard_familyinfo on iccard_card_student.xxcode =
iccard_familyinfo.xxcode
and iccard_card_student.xcode =
iccard_familyinfo.xcode
where iccard_familyinfo.xxcode in
(select xxcode from iccard_limit)) AA
left join (select iccard_safearrive_4mulcheck.xxcode,
xcode,
checktime,
iccard_safearrive_4mulcheck.regid,
re,
regularflag
from iccard_safearrive_4mulcheck
inner join iccard_school_setting on iccard_safearrive_4mulcheck.regid =
iccard_school_setting.regid
and iccard_safearrive_4mulcheck.xxcode =
iccard_school_setting.xxcode) BB on AA.Xxcode =
BB.XXCODE
and AA.xcode =
BB.xcode
where (regid is null or regid in (97, 98, 99));
BEGIN
--放到这里
if(to_number(to_char(sysdate ,'HH24')) < 9) then
begin
vcard_id := 1 ;
return ;
end ;
end if ; OPEN syn_cursor;
LOOP
FETCH syn_cursor
INTO vxxcode, vxcode, vxname, vmobile, vcard_id;
EXIT WHEN syn_cursor%NOTFOUND;
INSERT INTO iccard_stat_abstudent_new
(xxcode, xcode, xname, mobile, card_id,statdate)
values
(vxxcode, vxcode, vxname, vmobile, vcard_id,sysdate);
---发短信
INSERT INTO message_out
(xxcode,
xcode,
mobile,
msgtype,
optype,
msg,
sendtime,
creattime,
userid,
priority,
checkflag)
values(vxxcode,vxcode,vmobile,'09','21','尊敬的家长,您的孩子'||vxname||'上午没有到校打卡。',sysdate,sysdate,'02','','');
commit;
END LOOP;
CLOSE syn_cursor;END iccard_info_check;