Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01843: not a valid month (oracle 10.1.2)
ORA-01843: not a valid month [message #388155] Mon, 23 February 2009 09:07 Go to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Hi All
When i run the below query , i'm getting the following error message :ORA-12801: error signaled in parallel query server P015
ORA-01843: not a valid month:

select STG_INCSENLUT.ASSET_ID,STG_ITS_GEM_EVENTS.RTDIRNTYMEAS,STG_ITS_SENSOR15.ASSET_ID,STG_ITS_SENSOR15.SPEED_AVG


from STG_INCSENLUT,STG_ITS_GEM_EVENTS,STG_ITS_SENSOR15


where STG_INCSENLUT.RTDIRNTYMEAS=STG_ITS_GEM_EVENTS.RTDIRNTYMEAS


and STG_INCSENLUT.ASSET_ID=STG_ITS_SENSOR15.ASSET_ID


and STG_ITS_GEM_EVENTS.DATE_RECEIVED=STG_ITS_SENSOR15.DATE_READ


So i used the following TO_DATE function :


select STG_INCSENLUT.ASSET_ID,STG_ITS_GEM_EVENTS.RTDIRNTYMEAS,STG_ITS_SENSOR15.ASSET_ID,STG_ITS_SENSOR15.SPEED_AVG


from STG_INCSENLUT,STG_ITS_GEM_EVENTS,STG_ITS_SENSOR15


where STG_INCSENLUT.RTDIRNTYMEAS=STG_ITS_GEM_EVENTS.RTDIRNTYMEAS


and STG_INCSENLUT.ASSET_ID=STG_ITS_SENSOR15.ASSET_ID


and STG_ITS_GEM_EVENTS.TO_DATE(DATE_RECEIVED,'dd-MON-YYYY')=STG_ITS_SENSOR15.DATE_READ


and am still getting a different error :

ORA-00904: "STG_ITS_GEM_EVENTS"."TO_DATE": invalid identifier

Please any help is greatly appreciated.
Thanks
Re: ORA-01843: not a valid month [message #388158 is a reply to message #388155] Mon, 23 February 2009 09:21 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
to_date is a function that is performed on a column. A column is denoted as [TABLE.]COLUMN_NAME

You now made TO_DATE part of the column-name.
Re: ORA-01843: not a valid month [message #388159 is a reply to message #388155] Mon, 23 February 2009 09:33 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
This question seems familiar to me: http://forums.oracle.com/forums/thread.jspa?threadID=863433&tstart=0

The correct usage TO_DATE function is described in nearly every post of that thread (+ Frank did it here too).
Then, answer BluShadow's question in that thread.
Quote:
what are the datatypes of DATE_RECEIVED and DATE_READ?

Without that, the only thing I may state, is: some string column contains "date" value in wrong format.

[Edit: quoted the mentioned question]

[Updated on: Mon, 23 February 2009 09:38]

Report message to a moderator

Previous Topic: Global temp table throwing error
Next Topic: Need suggestions on Debugging a huge Union query with inline views (merged)
Goto Forum:
  


Current Time: Sat Dec 10 10:48:00 CST 2016

Total time taken to generate the page: 0.06201 seconds