Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> data comparision in Oracle

data comparision in Oracle

From: abjiang <member35506_at_dbforums.com>
Date: Mon, 11 Aug 2003 22:34:01 +0000
Message-ID: <3226846.1060641241@dbforums.com>

I need to compare a column whose format is like '2003-08-11 18:35:43.0' with the sysdate and select all the records whose date is one day ahead of the sysdate. My query is like this:

select * from tableA where to_date(substr(errinfo$datetime, 1, 19),'dd-mm-yyyy hh24:mi:ss') - sysdate)<0

I get an error when running this query:

"The following error has occurred:

ORA-01861: literal does not match format string"

Can anyone tell me what is wrong with my query and how to compare the date with the sysdate? Thanks!

Abby

--
Posted via http://dbforums.com
Received on Mon Aug 11 2003 - 17:34:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US