ORA-00904: invalid column name
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Divakar_Satyanarayan
Posted On:   Wednesday, January 29, 2003 04:40 AM

I have the following query which extracts time & Date from the same field in Table.

SELECT TO_CHAR(DATESUBMITTED,'HH24:MI:SS') AS TIMESUBMITTED,TO_CHAR(DATESUBMITTED,'MM/DD/YYYY') AS DATESUBMITTED
FROM TNAME ORDER BY TO_DATE(TIMESUBMITTED,'HH24:MI:SS') asc,
TO_DATE(DATESUBMITTED,'MM/DD/YYYY') asc


When the above query is executed from JDBC it throws
ORA-00904: invalid column name.

But the same query gets executed through SQL prompt.

What could be the reason ?

Have you come across this ?

Re: ORA-00904: invalid column name

Posted By:   Anonymous  
Posted On:   Wednesday, January 29, 2003 06:28 AM

TIMESUBMITTED is an alias, so it's not recognized as a valid column. Replace this with its equivalent.
About | Sitemap | Contact