Oracle Sql Developer “string literal too long” error

前端 未结 5 1257
甜味超标
甜味超标 2020-12-19 06:18

I have the following SQL that I would like to run in Oracle SQL Developer against an Oracle 10g server:

WITH openedXml AS (
  SELECT extractvalue(column_va         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 07:10

    You can use sql workaround using insert/updates where each part if less than 4000 chars.

    1 Do the insert as an insert with first part is the sql literal up to 4000 chars 2 Do the additional parts as an update concatenating the previous parts with the next part where the next part is up to 4000 chars 3 Repeat step 2 until all the large sql literal is updated.

    Example,

    Insert into
    test_large_literal (col1, col2)
    values
    (, );
    
    update
    test_large_literal
    set
    col2 = col2 || 
    where
    col1 = ;
    ...
    ...
    update
    test_large_literal
    set
    col2 = col2 || 
    where
    col1 = ;
    

提交回复
热议问题