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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sql query: to_date() :ORA-01830: date format picture ends bef

RE: sql query: to_date() :ORA-01830: date format picture ends bef

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Tue, 11 Mar 2003 12:45:27 -0800
Message-ID: <F001.00566DAA.20030311124527@fatcity.com>


Why are you comparing a date to a char?

select *
  from cust
 where to_char(DATECREATED,'DD-MON-YYY HH24:MI:SS') = '01-FEB-03 07:53:28' /

should work .... it appears that your NLS_DATE_FORMAT kicked in when your query tried to do an implicit char to date conversion (on the LHS part of the where clause)

Raj



Rajendra dot Jamadagni at espn dot com
Any views expressed here are strictly personal. QOTD: Any clod can have facts, having an opinion is an art !!

-----Original Message-----
Sent: Tuesday, March 11, 2003 3:20 PM
To: Multiple recipients of list ORACLE-L before

Hi...

I am getting the following error with a query like this

select * from cust where
to_char(DATECREATED,'DD-MON-YYY HH24:MI:SS') = to_date('01-FEB-03 07:53:28','DD-MON-YY HH24:MI:SS')

ORA-01830: date format picture ends before converting entire input string

What is the problem?

Thanks
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Basavaraja, Ravindra
  INET: Ravindra.Basavaraja_at_T-Mobile.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni_at_espn.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Tue Mar 11 2003 - 14:45:27 CST

Original text of this message

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