150 pts.
 Is there a quick way of running a query to select records based on” current sysdate – 1″ i.e yesterday.
Is there a quick way of running a query to select records based on current sysdate - 1 ie yesterday. Using Martin Gilbert's suggestion I get the current date & it works perfectly CD CHAR(CURRENT(DATE)) CURDAT SUBSTR(CD, 1, 2) || SUBSTR(CD, 4, 2) || SUBSTR(CD, 7, 2) Then use CURDAT in your selection However I want to do the comparison to always include today & yesterdays data. Thanks

Software/Hardware used:
ASKED: June 23, 2008  2:27 PM
UPDATED: June 23, 2008  3:57 PM

Answer Wiki:
Hi, You should be able to use the following :- YD char(current(date) - 1 DAYS) YESDAT SUBSTR(YD, 1, 2) || SUBSTR(YD, 4, 2) || SUBSTR(YD, 7, 2) Hope this helps, Martin Gilbert.
Last Wiki Answer Submitted:  June 23, 2008  3:57 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _