How do you subtract months from a timestamp variable in plsql using another variable as the interval number?
So I understand the syntax in a select statement would be eg select systimestamp - interval '4' month from dual;
so how could I do similar in a proc eg .
pi_months': number:4;
L_TSTAMP_NEW:=v_log_tstamp - interval ' pi_months' month;
how do I put the pi_months in the correct quotes . In the above form it gives an error - PLS-00167: keyword BULK is used in a wrong context.
Any suggestions would be much appreciated.