[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Issue with Date Comparisons in SQR
- Subject: Re: Issue with Date Comparisons in SQR
- From: "Mohammed, Taj" <Taj.Mohammed@LGEENERGY.COM>
- Date: Thu, 21 Mar 2002 14:13:55 -0500
- Importance: low
Tina,
convert EFFDT to character. It'll work...
Begin-Select
EMPLID
to_char(EFFDT,'YYYYMMDD') &EFFDT
If (&EFFDT <= '20010131')
LET $emplid = &EMLID
show $emplid
end-if
from ps_EMPLOYEES
End-Select
Taj.
-----Original Message-----
From: tina rao [mailto:rao_tina@HOTMAIL.COM]
Sent: Thursday, March 21, 2002 1:22 PM
To: SQR-USERS@list.iex.net
Subject: Issue with Date Comparisons in SQR
***************************************************
Hi,
I am facing a weird problem with date comparison in an sqr -
My code is something like this -
========================
Begin-Select
EMPLID
EFFDT
If (&EFFDT <= '31-JAN-2001')
LET $emplid = &EMLID
show $emplid
end-if
from ps_EMPLOYEES
End-Select
=========================
For some reason, the IF condition is returning True even when the EFFDT
value is '01-FEb-2001' !!
I tried testing the code by changing 31-JAN-2001 to 28-FEB-2001 and the sqr
returned records with EFFDT '01-MAR-2001' !! This happens only when the date
on the right is the last day of the month. ALso, Only the Records with EFFDT
as of the 1st day of the next month are returned.
Has anyone ever faced this problem? Any help would be greatly appreciated.
Thanks,
Tina.
****************************************************************
_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com