I'm on DB2/AIX64 8.2.9
I wrote a Freehand SQL which runs fine.But it has some hard-coded dates, which i want to declare on top and be able to change at a single place instead of changing it at several places manually.
A small bit of code which i'm using.
WHERE Start_Date >= '05/01/2009' AND End_Date <= '12/31/2009'.
Now, what i want to achieve is in the following lines :
DECLARE v_startdate date,v_enddate date;
set v_startdate = '05/01/2009', v_enddate = '12/31/2009';
WHERE Start_Date >= v_startdate AND End_Date <= v_enddate.
How can i do it? Please advise.