
May 8th, 2012, 03:39 PM
|
|
Registered User
|
|
Join Date: May 2012
Posts: 14
Time spent in forums: 4 h 20 m 33 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by hrs2012 Please help ......why doesn't the following SQL doesn't return any rows. (column1 is a 'date' datatype)
select * from table1
where to_char(column1, 'dd-mon-yyyy') = to_char(sysdate + 3 , 'dd-mon-yyyy')
Thanks |
TRUNC() is probably better here than TO_CHAR(). Try this:
Code:
select * from table1
where TRUNC(column1) = TRUNC(sysdate) + 3
|