Home » SQL & PL/SQL » SQL & PL/SQL » Selecting rows using SysDate
Selecting rows using SysDate [message #19253] Wed, 06 March 2002 22:06 Go to next message
Raj
Messages: 411
Registered: November 1998
Senior Member
Hi,

There is a date column in my table i have to select rows comparing with the date coulumn, where the dates r just one day before the sysdate.

I gave the query like this,
SELECT * FROM MYTABLE WHERE FUNCTION_DATE=(SYSDATE-1);

Since there r some relevent data for this query in the table,its says no rows returned.

Can any one help me out in this.

Thanks in advance.
Raj.
Re: Selecting rows using SysDate [message #19255 is a reply to message #19253] Wed, 06 March 2002 22:38 Go to previous message
seng
Messages: 191
Registered: February 2002
Senior Member
This should be working..

SELECT * FROM MYTABLE WHERE TO_CHAR(FUNCTION_DATE,'ddmmyyyy')=TO_CHAR(SYSDATE-1,'ddmmyyyy');

Hope this is helping
Previous Topic: count of characters
Next Topic: transfer data from excel File to Oracle
Goto Forum:
  


Current Time: Wed Apr 17 20:37:11 CDT 2024