I have a question on the declaration of CURSOR in DB2. My existing program uses CURSOR to fetch records from a DB2 table and then my program further filter out records that are 2 days old (by comparing maintenance date which is part of table variable).
Now i want to modify this logic and want that the extarcted records from cursor itself should be 2 days old. So my first question is, if it is feasible to use such a logic using system date variable like 'CURRENT-DATE' etc.
And if it is then what all process/precautions i need to follow to achieve the above objective.