ORA-00911 When Using 11.2.x JDBC Timestamp Literal 'ts' (Doc ID 1434015.1)

Last updated on SEPTEMBER 21, 2017

Applies to:

JDBC - Version 11.2.0.1 to 11.2.0.3.0 [Release 11.2]
Information in this document applies to any platform.

Symptoms

Using JDBC 11.2.0.1, when executing two JDBC timestamp literal 'ts' in a single query without a space between the ts literal and value, ORA-00911: invalid character error occurs.
The error does not occur when a single timestamp literal is used in the SQL query.


While executing JDBC timestamp literal 'ts' and date literal 'd' also, the ORA-00911 error is encountered.

Example :

Select xxxxxx
FROM xxxxxx
WHERE (someTimestampValue BETWEEN {ts'2011-05-13 00:00:00.0'} AND {ts'2011-05-13 23:59:59.0'})

While executing two date literals 'd' also, the ORA-00911 error is seen.

Example:

 


Error :
    
     ORA-00911: invalid character
     ORA-00936: missing expression


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms