Hi there,
I want a procedure to do the following:
update table1 set eventstate='Processed' where eventstate='Processing' and eventstarttime < sysdate-30;
here is my invalid procedure - please can you tell me where I'm going wrong?
create or replace procedure update_processed
DECLARE
estate varchar2(16) := 'Processed';
whestate varchar2(16) := 'Processing';
etime date := sysdate-30;
BEGIN
update table1
set eventstate= estate
where eventstate=whestate and eventstarttime < etime;
Commit;
End;
/
Cheers,
Sam
I want a procedure to do the following:
update table1 set eventstate='Processed' where eventstate='Processing' and eventstarttime < sysdate-30;
here is my invalid procedure - please can you tell me where I'm going wrong?
create or replace procedure update_processed
DECLARE
estate varchar2(16) := 'Processed';
whestate varchar2(16) := 'Processing';
etime date := sysdate-30;
BEGIN
update table1
set eventstate= estate
where eventstate=whestate and eventstarttime < etime;
Commit;
End;
/
Cheers,
Sam