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!

Issue in inserting into CLOB column

sadasivamFeb 28 2022

Hi,
I have table with CLOB column and I am trying to insert less than 5000 length string received from application.Assuming maximum length I will insert with in 10k length.
but I am getting error ORA-01704: string literal too long.
Can you please suggest .
create table test_tab(val clob);

insert into test_tab values('[{\"groupName\":\"Deal Details\",\"colOptions\":[{\"colName\":\"Quote #\",\"width\":null,\"seqNumber\":5,\"checked\":true},{\"colName\":\"Segment\",\"width\":null,\"seqNumber\":6,\"checked\":true},{\"colName\":\"Region\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Sub Region\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Country Group\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Country\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Build Site\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Merge Site\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Segment Contact\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Product Type\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Product Group\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"LOB\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Brand\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Family Parent\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Family\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Base Code\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"PLAN_LVL2\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"PLAN_LVL3\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"PLAN_LVL4\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"PLAN_LVL5\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"PLAN_LVL6\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"PLAN_LVL7\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Segmented Supply Chain\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Quote qty\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"OE date\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"OE Fiscal Week\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Total Quote Qty to load\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Confidence level\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Status\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Opportunity Type\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Unique Key Level 1\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Unique Key Level 2\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Proteus SubRegion\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Save Submit Status\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Sent To MPP\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"LOT ID\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Hotline Deal Flag\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Last Modified in Source\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Deleted from LOW\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"DD Staggered Deal\",\"width\":null,\"seqNumber\":0,\"checked\":false}]},{\"groupName\":\"Last week Change\",\"colOptions\":[{\"colName\":\"Changed from last week?\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Previous week Config\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Previous quote qty\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Previous OE Date\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Previous OE Fiscal Week\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Previous confidence level\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Previous Status\",\"width\":null,\"seqNumber\":0,\"checked\":false}]},{\"groupName\":\"Outlier Detection\",\"colOptions\":[{\"colName\":\"Outlier\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"Number of Part level outliers\",\"width\":null,\"seqNumber\":0,\"checked\":false}]},{\"groupName\":\"Risk Analysis\",\"colOptions\":[{\"colName\":\"True OE Date\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"True Probability(%)\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"In UPP\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"UPP weight\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"UPP qty loaded\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"UPP month loaded\",\"width\":null,\"seqNumber\":0,\"checked\":false}]},{\"groupName\":\"Supply Information\",\"colOptions\":[{\"colName\":\"MPP 4 WK Average\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"SUPPORTABILITY\",\"width\":null,\"seqNumber\":0,\"checked\":false},{\"colName\":\"SUPPORTABILITY Comments\",\"width\":null,\"seqNumber\":0,\"checked\":false}]}]');
getting below error,
[Error] Execution (68: 31): ORA-01704: string literal too long

This post has been answered by Paulzip on Feb 28 2022
Jump to Answer
Comments
Post Details
Added on Feb 28 2022
5 comments
593 views