I want to have a single parameter in my script for a year.
define YYYY = 2014;
then I want a 2nd parameter based on this one
YYYY2 = &&YYYY - 1;
i.e. it's 1 year earlier
But from the reading i've done so far this seems to be impossible.
Here's my attempt
define YYYY = 2014;
define YYYY2 = &&YYYY - 1;
select &&YYYY, &&YYYY2 from DUAL
select * from cb_enrolment2_&&YYYY;
select * from cb_enrolment2_&&YYYY2 ;
response for last line of code is :
ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
Error at Line: x Column: y