[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Need help On SQR Date Comparison



Hi all,

I am writing a SQR to select rows from PSaudit and a couple of other tables
for a report.

I need to select the rows that ACTION_DT ( on the job record )= $AsOfDate.
Here is the Syntax I used:

" to_date(B.ACTION_DT,'DD-MON-YYYY') = to_date($AsOfDate,'DD-MON-YYYY')"

Even through there are data fot the 'AsofDate', it returns no row. But if I
change it to :

" to_date(B.ACTION_DT,'DD-MON-YYYY') <= to_date($AsOfDate,'DD-MON-YYYY')"

It works fine. The problem is I only need the rows with '=' Dates. Not "<="

Please offer your suggestions.

Thanks,
Bessie