Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01704 string literal too long

709788Jun 27 2012 — edited Jun 29 2012
Hello, I started 2409224 thread, and thought it got resolved. But when tested with actual (much bigger) data instead of test data, I got this error: ORA-01704 string literal too long error

Basically :memo variable below is coming from reporing environment's GUI control. Its supposed to contain IDs (10 character long), one per row. But thousands of them at once.
SELECT PHONE_NUMBER FROM TELEPHONE
WHERE ID IN
(
    SELECT REGEXP_SUBSTR(:memo,'\w+',1,LEVEL) ID
        FROM DUAL
    CONNECT BY
        LEVEL <= REGEXP_COUNT(:memo,'\w+',1)
)
How do I get rid of the exception? I've tried CASTing :memo to CLOB but then I get ORA-00932: inconsistent datatypes: expected - got CLOB
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2012
Added on Jun 27 2012
26 comments
4,582 views