While I try to set the value of over 4000 characters on a field that has data type CLOB
, it gives me this error :
ORA-01704: string literal too long.
Any suggestion, which data type would be applicable for me if I have to set value of unlimited characters although for my case, it happens to be of about 15000
chars.
Note : The long string that I am trying to store is encoded in ANSI.
What are you using when operate with CLOB?
In all events you can do it with PL/SQL
Proof link on SQLFiddle
Try to split the characters into multiple chunks like the query below and try:
It worked for me.
To solve this issue on my side, I had to use a combo of what was already proposed there
Hope this helps.
The split work until 4000 chars depending on the characters that you are inserting. If you are inserting special characters it can fail. The only secure way is to declare a variable.