[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Need help On SQR Date Comparison
Try this
trunc(to_date(B.ACTION_DT,'DD-MON-YYYY'), 'DD') =
trunc(to_date($AsOfDate,'DD-MON-YYYY'), 'DD)
-----Original Message-----
From: Discussion of SQR, Brio Software's database reporting language
[mailto:SQR-USERS@LIST.IEX.NET]On Behalf Of GANB
Sent: Thursday, April 25, 2002 11:46 AM
To: SQR-USERS@LIST.IEX.NET
Subject: 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