My Oracle Support Banner

ORA-00907: Missing Right Parenthesis when SQL syntax contains ESCAPE clause (Doc ID 1098494.1)

Last updated on AUGUST 09, 2023

Applies to:

JDBC - Version 11.2.0.1.0 and later
Information in this document applies to any platform.


Symptoms

A JDBC testcase issuing the following query gets a java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis


PreparedStatement testMeyer = con.prepareStatement("SELECT /*+ FIRST_ROWS(1001) */ USER_PROFILE.USER_ID,USER_PROFILE.USER_NAME,USER_PROFILE.TITLE,USER_PROFILE.ROLE_ID,USER_PROFILE.EMAIL,USER_PROFILE.COUNTRY,USER_PROFILE.LAYOUT_ID,USER_PROFILE.LANGUAGE_ID FROM USER_PROFILE WHERE ( 1=1) AND (1=1 AND (1=1 AND USER_PROFILE.USER_ID like ? { ESCAPE '~' } )) AND (ROWNUM <=1001)");

Changes

The issue is specific to the JDBC 11.2.0.1 driver

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.