First google hit for "ORA-01704"
http://ora-01704.ora-code.com/

"Cause: The string literal is longer than 4000 characters.
Action: Use a string literal of at most 4000 characters. Longer values
may only be entered using bind variables."

>From google search "oracle set bind variable"
http://www.akadia.com/services/ora_bind_variables.html:

So your sql would look like this:

variable clobVal clob
exec :clobVal := 'test'
"INSERT INTO SDI_XML_TAB(SDIID,SDIDOC) VALUES('ABC',:clobVal)"

Axton Grams

On 10/4/07, arthurj <[EMAIL PROTECTED]> wrote:
> Folks,
> I get error - ORA-01704: string literal too long,
> when trying to insert a value >4k into the SDIDOC column of the table below:
>
>   CREATE TABLE "B1"."SDI_XML_TAB"
>    (    "SDIID" VARCHAR2(60 BYTE) NOT NULL ENABLE,
>         "SDIDOC" "SYS"."XMLTYPE" ,
>          CONSTRAINT "SDI_XML_TAB_PK" PRIMARY KEY ("SDIID")
>   USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
>   STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
>   PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
>   TABLESPACE "B1SYSTEM"  ENABLE
>    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
>   STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
>   PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
>   TABLESPACE "B1SYSTEM"
>  XMLTYPE COLUMN "SDIDOC" STORE AS CLOB (
>   TABLESPACE "B1SYSTEM" ENABLE STORAGE IN ROW CHUNK 16384 PCTVERSION 10
>   NOCACHE LOGGING
>   STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
>   PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
>
>
> The SQL I used using OCI was:
> "INSERT INTO SDI_XML_TAB(SDIID,SDIDOC) VALUES('ABC','clobVal')"
>
> What am I doing wrong?
>
> Thanks,
> Arthur
> --
> View this message in context: 
> http://www.nabble.com/ORA-01704%3A-string-literal-too-long-%28URGENT%29-tf4568693.html#a13039439
> Sent from the ARS (Action Request System) mailing list archive at Nabble.com.
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
> Answers Are"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to