PL/SQL (MOSC)

MOSC Banner

ORA-01704 in OPEN-FOR when using VARCHAR2(32767)

edited Feb 29, 2012 10:35PM in PL/SQL (MOSC) 11 commentsAnswered ✓
We are currently running Oracle Database 10.2.0.4 (yes, someone is working on the upgrade to 11g).  We have a stored procedure to which the application sends a literal string containing a query (no bind variables) that always returns a number.  We have been using the code below for years.  Now that users are getting more dynamic, the queries are getting longer and longer, but still well within 32767 characters.  However, the code fails in the OPEN statement with "ORA-01704: string literal too long" when the string is greater than about 4352 characters or so.  I tried using varchar2(32767 CHAR), but

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center