ORA-01704: 字符串文字太长

oracle 执行数据库更新时提示:ORA-01704: 字符串文字太长

1
2
3
4
update formtable_main_44
set mksj = '{"1635609":{"invoiceNumber":"0006605440","invoiceType":"OTHER","invoiceCode":"00010124"},"1635607":{"invoiceNumber":"0006606916","invoiceType":"OTHER","invoiceCode":"00010124"},"1635605":{"invoiceNumber":"0006606893","invoiceType":"OTHER","invoiceCode":"00010124"},"1635601":{"invoiceNumber":"0006606882","invoiceType":"OTHER","invoiceCode":"00010124"},"1635568":{"invoiceNumber":"0003824917","invoiceType":"OTHER","invoiceCode":"00010124"},"1635569":{"invoiceNumber":"0003824916","invoiceType":"OTHER","invoiceCode":"00010124"},"1635566":{"invoiceNumber":"0003824914","invoiceType":"OTHER","invoiceCode":"00010124"},"1635567":{"invoiceNumber":"0003824911","invoiceType":"OTHER","invoiceCode":"00010124"},"1635564":{"invoiceNumber":"0003824919","invoiceType":"OTHER","invoiceCode":"00010124"},"1635565":{"invoiceNumber":"0003824912","invoiceType":"OTHER","invoiceCode":"00010124"},"1635562":{"invoiceNumber":"0003824920","invoiceType":"OTHER","invoiceCode":"00010124"},"1635563":{"invoiceNumber":"0003824908","invoiceType":"OTHER","invoiceCode":"00010124"},"1635560":{"invoiceNumber":"0003824915","invoiceType":"OTHER","invoiceCode":"00010124"},"1635561":{"invoiceNumber":"0003824909","invoiceType":"OTHER","invoiceCode":"00010124"},"1635619":{"invoiceNumber":"0006605416","invoiceType":"OTHER","invoiceCode":"00010124"},"1635617":{"invoiceNumber":"0006605412","invoiceType":"OTHER","invoiceCode":"00010124"},"1635615":{"invoiceNumber":"0006605393","invoiceType":"OTHER","invoiceCode":"00010124"},"1635579":{"invoiceNumber":"0006606120","invoiceType":"OTHER","invoiceCode":"00010124"},"1635613":{"invoiceNumber":"0006605407","invoiceType":"OTHER","invoiceCode":"00010124"},"1635577":{"invoiceNumber":"0006606110","invoiceType":"OTHER","invoiceCode":"00010124"},"1635578":{"invoiceNumber":"0006606113","invoiceType":"OTHER","invoiceCode":"00010124"},"1635611":{"invoiceNumber":"0006605389","invoiceType":"OTHER","invoiceCode":"00010124"},"1635575":{"invoiceNumber":"0006606096","invoiceType":"OTHER","invoiceCode":"00010124"},"1635573":{"invoiceNumber":"0003824924","invoiceType":"OTHER","invoiceCode":"00010124"},"1635574":{"invoiceNumber":"0006606088","invoiceType":"OTHER","invoiceCode":"00010124"},"1635571":{"invoiceNumber":"0003824913","invoiceType":"OTHER","invoiceCode":"00010124"},"1635572":{"invoiceNumber":"0003824925","invoiceType":"OTHER","invoiceCode":"00010124"},"1635570":{"invoiceNumber":"0003824922","invoiceType":"OTHER","invoiceCode":"00010124"},"1635627":{"invoiceNumber":"0006605433","invoiceType":"OTHER","invoiceCode":"00010124"},"1635625":{"invoiceNumber":"0006605428","invoiceType":"OTHER","invoiceCode":"00010124"},"1635623":{"invoiceNumber":"0006605424","invoiceType":"OTHER","invoiceCode":"00010124"},"1635588":{"invoiceNumber":"0006606091","invoiceType":"OTHER","invoiceCode":"00010124"},"1635621":{"invoiceNumber":"0006605419","invoiceType":"OTHER","invoiceCode":"00010124"},"1635589":{"invoiceNumber":"0006606100","invoiceType":"OTHER","invoiceCode":"00010124"},"1635586":{"invoiceNumber":"0006606948","invoiceType":"OTHER","invoiceCode":"00010124"},"1635584":{"invoiceNumber":"0006606924","invoiceType":"OTHER","invoiceCode":"00010124"},"1635582":{"invoiceNumber":"0006606892","invoiceType":"OTHER","invoiceCode":"00010124"},"1635583":{"invoiceNumber":"0006606915","invoiceType":"OTHER","invoiceCode":"00010124"},"1635580":{"invoiceNumber":"0006606861","invoiceType":"OTHER","invoiceCode":"00010124"},"1635581":{"invoiceNumber":"0006606888","invoiceType":"OTHER","invoiceCode":"00010124"},"1635638":{"invoiceNumber":"0006605465","invoiceType":"OTHER","invoiceCode":"00010124"},"1635639":{"invoiceNumber":"0006606326","invoiceType":"OTHER","invoiceCode":"00010124"},"1635559":{"invoiceNumber":"0003824906","invoiceType":"OTHER","invoiceCode":"00010124"},"1635636":{"invoiceNumber":"0006605459","invoiceType":"OTHER","invoiceCode":"00010124"},"1635637":{"invoiceNumber":"0006605462","invoiceType":"OTHER","invoiceCode":"00010124"},"1635634":{"invoiceNumber":"0006605453","invoiceType":"OTHER","invoiceCode":"00010124"},"1635557":{"invoiceNumber":"0003824910","invoiceType":"OTHER","invoiceCode":"00010124"},"1635558":{"invoiceNumber":"0003824907","invoiceType":"OTHER","invoiceCode":"00010124"},"1635635":{"invoiceNumber":"0006605454","invoiceType":"OTHER","invoiceCode":"00010124"},"1635599":{"invoiceNumber":"0006606863","invoiceType":"OTHER","invoiceCode":"00010124"},"1635555":{"invoiceNumber":"24442000000155195129","invoiceType":"ELECTRONIC_SPACIAL_VAT","invoiceCode":""},"1635632":{"invoiceNumber":"0006605444","invoiceType":"OTHER","invoiceCode":"00010124"},"1635633":{"invoiceNumber":"0006605449","invoiceType":"OTHER","invoiceCode":"00010124"},"1635630":{"invoiceNumber":"0006606332","invoiceType":"OTHER","invoiceCode":"00010124"},"1635597":{"invoiceNumber":"0006606856","invoiceType":"OTHER","invoiceCode":"00010124"},"1635631":{"invoiceNumber":"0006606352","invoiceType":"OTHER","invoiceCode":"00010124"},"1635595":{"invoiceNumber":"0006606116","invoiceType":"OTHER","invoiceCode":"00010124"},"1635593":{"invoiceNumber":"0006606107","invoiceType":"OTHER","invoiceCode":"00010124"}}',
sfmjd = '1'
where requestid = 4633032;

ORA-01704 错误指示在 Oracle SQL 语句中使用的字符串字面值超过了允许的最大长度 4000 个字符

可以通过设置变量的方式更新数据

1
2
3
4
5
declare
V_clobdata CLOB := '{"1635609":{"invoiceNumber":"0006605440","invoiceType":"OTHER","invoiceCode":"00010124"},"1635607":{"invoiceNumber":"0006606916","invoiceType":"OTHER","invoiceCode":"00010124"},"1635605":{"invoiceNumber":"0006606893","invoiceType":"OTHER","invoiceCode":"00010124"},"1635601":{"invoiceNumber":"0006606882","invoiceType":"OTHER","invoiceCode":"00010124"},"1635568":{"invoiceNumber":"0003824917","invoiceType":"OTHER","invoiceCode":"00010124"},"1635569":{"invoiceNumber":"0003824916","invoiceType":"OTHER","invoiceCode":"00010124"},"1635566":{"invoiceNumber":"0003824914","invoiceType":"OTHER","invoiceCode":"00010124"},"1635567":{"invoiceNumber":"0003824911","invoiceType":"OTHER","invoiceCode":"00010124"},"1635564":{"invoiceNumber":"0003824919","invoiceType":"OTHER","invoiceCode":"00010124"},"1635565":{"invoiceNumber":"0003824912","invoiceType":"OTHER","invoiceCode":"00010124"},"1635562":{"invoiceNumber":"0003824920","invoiceType":"OTHER","invoiceCode":"00010124"},"1635563":{"invoiceNumber":"0003824908","invoiceType":"OTHER","invoiceCode":"00010124"},"1635560":{"invoiceNumber":"0003824915","invoiceType":"OTHER","invoiceCode":"00010124"},"1635561":{"invoiceNumber":"0003824909","invoiceType":"OTHER","invoiceCode":"00010124"},"1635619":{"invoiceNumber":"0006605416","invoiceType":"OTHER","invoiceCode":"00010124"},"1635617":{"invoiceNumber":"0006605412","invoiceType":"OTHER","invoiceCode":"00010124"},"1635615":{"invoiceNumber":"0006605393","invoiceType":"OTHER","invoiceCode":"00010124"},"1635579":{"invoiceNumber":"0006606120","invoiceType":"OTHER","invoiceCode":"00010124"},"1635613":{"invoiceNumber":"0006605407","invoiceType":"OTHER","invoiceCode":"00010124"},"1635577":{"invoiceNumber":"0006606110","invoiceType":"OTHER","invoiceCode":"00010124"},"1635578":{"invoiceNumber":"0006606113","invoiceType":"OTHER","invoiceCode":"00010124"},"1635611":{"invoiceNumber":"0006605389","invoiceType":"OTHER","invoiceCode":"00010124"},"1635575":{"invoiceNumber":"0006606096","invoiceType":"OTHER","invoiceCode":"00010124"},"1635573":{"invoiceNumber":"0003824924","invoiceType":"OTHER","invoiceCode":"00010124"},"1635574":{"invoiceNumber":"0006606088","invoiceType":"OTHER","invoiceCode":"00010124"},"1635571":{"invoiceNumber":"0003824913","invoiceType":"OTHER","invoiceCode":"00010124"},"1635572":{"invoiceNumber":"0003824925","invoiceType":"OTHER","invoiceCode":"00010124"},"1635570":{"invoiceNumber":"0003824922","invoiceType":"OTHER","invoiceCode":"00010124"},"1635627":{"invoiceNumber":"0006605433","invoiceType":"OTHER","invoiceCode":"00010124"},"1635625":{"invoiceNumber":"0006605428","invoiceType":"OTHER","invoiceCode":"00010124"},"1635623":{"invoiceNumber":"0006605424","invoiceType":"OTHER","invoiceCode":"00010124"},"1635588":{"invoiceNumber":"0006606091","invoiceType":"OTHER","invoiceCode":"00010124"},"1635621":{"invoiceNumber":"0006605419","invoiceType":"OTHER","invoiceCode":"00010124"},"1635589":{"invoiceNumber":"0006606100","invoiceType":"OTHER","invoiceCode":"00010124"},"1635586":{"invoiceNumber":"0006606948","invoiceType":"OTHER","invoiceCode":"00010124"},"1635584":{"invoiceNumber":"0006606924","invoiceType":"OTHER","invoiceCode":"00010124"},"1635582":{"invoiceNumber":"0006606892","invoiceType":"OTHER","invoiceCode":"00010124"},"1635583":{"invoiceNumber":"0006606915","invoiceType":"OTHER","invoiceCode":"00010124"},"1635580":{"invoiceNumber":"0006606861","invoiceType":"OTHER","invoiceCode":"00010124"},"1635581":{"invoiceNumber":"0006606888","invoiceType":"OTHER","invoiceCode":"00010124"},"1635638":{"invoiceNumber":"0006605465","invoiceType":"OTHER","invoiceCode":"00010124"},"1635639":{"invoiceNumber":"0006606326","invoiceType":"OTHER","invoiceCode":"00010124"},"1635559":{"invoiceNumber":"0003824906","invoiceType":"OTHER","invoiceCode":"00010124"},"1635636":{"invoiceNumber":"0006605459","invoiceType":"OTHER","invoiceCode":"00010124"},"1635637":{"invoiceNumber":"0006605462","invoiceType":"OTHER","invoiceCode":"00010124"},"1635634":{"invoiceNumber":"0006605453","invoiceType":"OTHER","invoiceCode":"00010124"},"1635557":{"invoiceNumber":"0003824910","invoiceType":"OTHER","invoiceCode":"00010124"},"1635558":{"invoiceNumber":"0003824907","invoiceType":"OTHER","invoiceCode":"00010124"},"1635635":{"invoiceNumber":"0006605454","invoiceType":"OTHER","invoiceCode":"00010124"},"1635599":{"invoiceNumber":"0006606863","invoiceType":"OTHER","invoiceCode":"00010124"},"1635555":{"invoiceNumber":"24442000000155195129","invoiceType":"ELECTRONIC_SPACIAL_VAT","invoiceCode":""},"1635632":{"invoiceNumber":"0006605444","invoiceType":"OTHER","invoiceCode":"00010124"},"1635633":{"invoiceNumber":"0006605449","invoiceType":"OTHER","invoiceCode":"00010124"},"1635630":{"invoiceNumber":"0006606332","invoiceType":"OTHER","invoiceCode":"00010124"},"1635597":{"invoiceNumber":"0006606856","invoiceType":"OTHER","invoiceCode":"00010124"},"1635631":{"invoiceNumber":"0006606352","invoiceType":"OTHER","invoiceCode":"00010124"},"1635595":{"invoiceNumber":"0006606116","invoiceType":"OTHER","invoiceCode":"00010124"},"1635593":{"invoiceNumber":"0006606107","invoiceType":"OTHER","invoiceCode":"00010124"}}';
BEGIN
update formtable_main_44 set mksj = V_clobdata, sfmjd = '1' where requestid = 4633032;
END;