create procedure proc_js_txx_1
as
update js_txx
set js_txx.ctzt='空闲',
js_txx.dktsj=null
from js_txx
where datediff(Mi,js_txx.dktsj,getdate()>40)
and js_txx.ctzt='整理'
请高手指招!
...全文
16910打赏收藏
将SQLSERVER存储过程改为ORACLE的存储过程
create procedure proc_js_txx_1 as update js_txx set js_txx.ctzt='空闲', js_txx.dktsj=null from js_txx where datediff(Mi,js_txx.dktsj,getdate()>40) and js_txx.ctzt='整理' 请高手指招!
create or replace procedure proc_js_txx_1
as
begin
update js_txx a
set js_txx.ctzt='空闲',
js_txx.dktsj=null
where exists (
select 1 from js_txx
where (SYSDATE-js_txx.dktsj)*24*60>40
and rowid=a.rowid
)
and js_txx.ctzt='整理';
commit;
end proc_js_txx_1;
create or replace procedure proc_js_txx_1
as
begin
update js_txx a
set js_txx.ctzt='空闲',
js_txx.dktsj=null
where exists (
select 1 from js_txx
where trunc(sysdate-dktsj)>40
and rowid=a.rowid
)
and js_txx.ctzt='整理';
commit;
end proc_js_txx_1;
/