on 08-18-2011 12:02 AM
Hi Experts!!
Trying to use SQL to extract the data from JAVA Table VT_AE_CHG_LOG as the actual user screen does not allow download. We would like only the Data after a certain date.
Here is the SQL stmt: Select * from VT_AE_CHG_LOG where CHG_TIME > '06/30/2011 08:30:30'
Here is the error that it returns: ERROR: The SQL statement "SELECT * FROM "VT_AE_CHG_LOG" WHERE "CHG_TIME" > '06/30/2011 08:30:30'" contains the semantics error[s]: - 1:35 - type check error: the left hand side >>"CHG_TIME"<< (TIMESTAMP) and the right hand side >>'06/30/2011 08:30:30'<< (CHAR) of a comparison operator are not comparable
Help on the syntax would be much appreciated!!
Thanks,
John
Edited by: John Stephens on Aug 18, 2011 1:02 AM
Hi John,
The problem is with the time format. Use the comfort function:
CONVERT(varchar, CONVERT(datetime, 'Your date & Time')))
Regards,
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.