ORA-01704 in OPEN-FOR when using VARCHAR2(32767)
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
0