Dear All,
How do i get current date or sysdate in procedure? My procedure is like below.
create or replace procedure procedure_name
as
cursor c is select * from <table.name> where effdt = <current date / sysdate > for update;
begin
for r in c loop
-- insert statement here
r.field1,
r.field2);
commit;
end loop;
end procedure_name;
When i tried change current date / sysdate to a string, my procedure works well. So from there i know procedure wont accept any parameter/function here. the reason why is because i only want row with current date / sysdate to be inserted as this procedure being scheduled as a daily basis.
If you guys got better approach please..please..Please enlighten me T T.