11 Replies Latest reply on Nov 18, 2019 6:49 AM by 3769660

    How to get current date/sysdate in procedure


      Dear All,


      How do i get current date or sysdate in procedure? My procedure is like below.


      create or replace procedure  procedure_name


      cursor c is select * from <table.name> where effdt = <current date / sysdate > for update;



      for r in c loop

      -- insert statement here





      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.