17,377
社区成员
发帖
与我相关
我的任务
分享
create or replace procedure cdr5(v_date out varchar2)
is
v_sql varchar2(100);
begin
v_date := to_char(sysdate,'yyyymmdd');
insert into cdr (kehhao,zhangh,zhhuye,shij)
select distinct kehhao,zhangh,zhhuye,v_date as shij
from aghfh t1
where not exists(select null from cdr t2 where t2.kehhao = t1.kehhao and t2.zhangh = t1.zhangh and t2.zhhuye =t1.zhhuye);
commit;
v_sql :='update cdr set day'||to_char(sysdate,'dd')||'= zhhuye';
execute immediate v_sql;
commit;
end cdr5;
create or replace procedure cdr5(v_date out varchar2)
is
v_sql varchar2(100);
begin
v_date := to_char(sysdate,'yyyymmdd');
insert into cdr (kehhao,zhangh,zhhuye,shij)
select kehhao,zhangh,zhhuye,v_date as shij
from aghfh t1
where not exists(select null from cdr t2 where t2.kehhao = t1.kehhao and t2.zhangh = t1.zhangh and t2.zhhuye =t1.zhhuye);
commit;
v_sql :='update cdr set day'||to_char(sysdate,'dd')||'= zhhuye';
execute immediate v_sql;
commit;
end cdr5;