Reg: Insertion of > 4 k characters clob data

Hi Experts,

I have a text that is more than 4K characters, so I'm not able to store it in a CLOB table column using a simple INSERT statement.

Read this technique by Solomon and have tried it, but do not get the result:

DECLARE
query_txt CLOB: = to_clob (q '[my_text_goes_here]');

I have SEVERAL;
j NUMBER;

CLOB x;

BEGIN

I: = 4000;
j: = 1;

-dbms_output.put_line (Dbms_Lob.getlength (query_txt));
-ALL-IN (DBMS_LOB. SUBSTR (query_txt, i, j) IS NOT NULL)

x: = "insert into query_master values (q 3," [';]) "

LOOP
-Dbms_Output.put_line (j: ' * ' | i |' * ' |) DBMS_LOB. SUBSTR (query_txt, i, j));

x : = x || DBMS_LOB. SUBSTR (query_txt, i, j);

j: = i + 1;
i: = i + 4000;

WHEN THE EXIT DBMS_LOB. SUBSTR (query_txt, i, j) is null;
END LOOP;

x : = x ||'] ("," aaa,"bb", "Y", "BK FILED")';

EXECUTE IMMEDIATE x; -USING: query_txt.

-Dbms_Output.put_line (x);
-Dbms_Output.put_line (Dbms_Lob.SubStr(x,1000,1));

EXCEPTION
WHILE OTHERS then
Dbms_Output.put_line (Dbms_Utility.format_error_backtrace |) SQLERRM);
END;

My idea was to make pieces of 4000 characters and then pass it to the Insert statement.

SQL > query_master desc;

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

QID                                                NUMBER

QUERY_TEXT CLOB

QUERY_COLS VARCHAR2 (3500)

IS_ACTIVE CHAR (1)

WORKSHEET_NAME VARCHAR2 (50)

Could if it you please let me know where I am doing wrong?

Thank you and best regards,

-Nordine

(on Oracle 11.2.0.3.0 - Exadata )

Not sure what you are talking.

SQL> create table t (id integer, str clob);

Table created.

SQL> declare
  2    l_clob clob := rpad('karthick', 20000, 'x');
  3  begin
  4    insert into t (id, str) values (1, l_clob);
  5  end;
  6  /

PL/SQL procedure successfully completed.

SQL> select id, dbms_lob.getlength(str) str_len
  2    from t;

        ID    STR_LEN
---------- ----------
         1      20000

Tags: Database

Similar Questions

  • Insert/update the column with the clob data type

    Hi all

    ORCL Version: 11g.

    I have a table with the clob data type.

    Test12

    (col1 clob);

    I'm trying to insert/update to update the column with more than 4000 characters.

    But due to the limitation of tank 4000, I could not Insert/Update.

    Need your help in resolving this issue.

    THX

    Rod.

    The limit of 4000 characters is incorrect.  That pertains only to the varchar2 data type.  A clob can hold more than 4 G.

    Here is an example that shows how to insert it, I found...

    Otherwise, here is a way 'dirty' to do.

    insert into your_table (COLA, COLB)

    values

    (PRIMARY_KEY, PART 1 OF DATA)

    ;

    Update your_table

    Define COLB = COLB | PART 2 OF BIG DATA

    where COLA = PRIMARY_KEY;

    Update your_table

    Define COLB = COLB | PART 3 OF BIG DATA

    where COLA = PRIMARY_KEY;

    .. and so on...

    I don't know that I personally recommend the second style...  But he could do the job.

  • Insert text into the clob data type column.

    I want to insert text below in the clob column:

    Create a text (a clob);

    insert into text values (a) (q' [])

    <? XML version = "1.0"? >

    " < xsl: stylesheet version ="1.0"xmlns: xsl = ' http://www.w3.org/1999/XSL/transform ">

    < xsl: output method = withdrawal of "text" = "yes" / >

    <! - declaration of variable for catlogid - >

    < name of xsl: variable = "vrCATALOG_ID" / >

    <! - declaration of variable for group - >

    < name of xsl: variable = "vrGROUP_TOC_ID" / >

    < name of xsl: variable = "vrGROUP_TOC_ALIAS" / >

    < name of xsl: variable = "vrGROUP_TOC_TITLE" / >

    < name of xsl: variable = "vrGROUP_TOC_TITLE_KEY" / >

    < name of xsl: variable = "vrGROUP_TOC_TITLE_TAG" / >

    < name of xsl: variable = "vrGROUP_ORDER" / >

    < name of xsl: variable = "vrGROUP_GRAPHIC_ID" / >

    < name of xsl: variable = "vrGROUP_XT_FILE_NAME" / >

    < name of xsl: variable = "vrGROUP_MAPPING_MARKET" / >

    < name of xsl: variable = "vrGROUP_MAPPING_FAMILY" / >

    < name of xsl: variable = "vrGROUP_MAPPING_LINE" / >

    < name of xsl: variable = "vrGROUP_MAPPING_BODY" / >

    < name of xsl: variable = "vrGROUP_MAPPING_SERIES" / >

    < name of xsl: variable = "vrGROUP_MAPPING_MODELYEAR" / >

    < name of xsl: variable = "vrGROUP_LINE_SHOW" / >

    < name of xsl: variable = "vrGROUP_SERIES_SHOW" / >

    < name of xsl: variable = "vrGROUP_ENGINE_SHOW" / >

    < name of xsl: variable = "vrGROUP_BODY_SHOW" / >

    < name of xsl: variable = "vrGROUP_TRANS_SHOW" / >

    < name of xsl: variable = "vrGROUP_TRIM_SHOW" / >

    < name of xsl: variable = "vrSEQ_LINE_SHOW" / >

    < name of xsl: variable = "vrSEQ_SERIES_SHOW" / >

    < name of xsl: variable = "vrSHOW_VALUE" / >

    <! - declaration of variable for logicalillustrations - >

    < name of xsl: variable = "vrLogIll_TOC_ID" / >

    < name of xsl: variable = "vrLogIll_TOC_ALIAS" / >

    < name of xsl: variable = "vrLogIll_TOC_TITLE" / >

    < name of xsl: variable = "vrLogIll_TOC_TITLE_KEY" / >

    < name of xsl: variable = "vrLogIll_TOC_TITLE_TAG" / >

    < name of xsl: variable = "vrLogIll_GRAPHIC_ID" / >

    < name of xsl: variable = "vrLogIll_XT_FILE_NAME" / >

    < name of xsl: variable = "vrLogIll_MAPPING_MARKET" / >

    < name of xsl: variable = "vrLogIll_MAPPING_FAMILY" / >

    < name of xsl: variable = "vrLogIll_MAPPING_LINE" / >

    < name of xsl: variable = "vrLogIll_MAPPING_BODY" / >

    < name of xsl: variable = "vrLogIll_MAPPING_SERIES" / >

    < name of xsl: variable = "vrLogIll_MAPPING_MODELYEAR" / >

    < name of xsl: variable = "numberLogIll" / >

    <! - declaration of variable for the illustrations - >

    < name of xsl: variable = "vrIll_TOC_ID" / >

    < name of xsl: variable = "vrIll_TOC_ALIAS" / >

    < name of xsl: variable = "vrIll_TOC_TITLE" / >

    < name of xsl: variable = "vrIll_TOC_TITLE_KEY" / >

    < name of xsl: variable = "vrIll_TOC_TITLE_TAG" / >

    < name of xsl: variable = "vrIll_TOC_SUBTITLE" / >

    < name of xsl: variable = "vrIll_GRAPHIC_ID" / >

    < name of xsl: variable = "numberIllus" / >

    < name of xsl: variable = "vrIll_ENGINE" / >

    < name of xsl: variable = "vrIll_TRANSMISSION" / >

    < name of xsl: variable = "vrIll_TRIM" / >

    < name of xsl: variable = "vrIll_MARKET" / >

    < name of xsl: variable = "vrIll_LINE" / >

    < name of xsl: variable = "vrIll_BODY" / >

    < name of xsl: variable = "vrIll_SERIES" / >

    < name of xsl: variable = "vrIll_XT_FILE_NAME" / >

    < name of xsl: variable = "vrIll_NOTE_TXT_KEY" / >

    < name of xsl: variable = "vrIll_NOTE_TXT_TAG" / >

    < name of xsl: variable = "vrIll_MAPPING_FAMILY" / >

    < name of xsl: variable = "vrIll_MAPPING_MODELYEAR" / >

    < name of xsl: variable = "vrIll_NOTE_TXT" / >

    < name of xsl: variable = "vrIll_NOTE_XT_ID" / >

    < name of xsl: variable = "vrIll_NOTE_TOC_ID" / >

    <!--> Declaration of the variable element

    < name of xsl: variable = "vrIt_ITEM_ID" / >

    < name of xsl: variable = "vrIt_SEQUENCE_NBR" / >

    < name of xsl: variable = "vrIt_ITEM_NBR" / >

    < name of xsl: variable = "vrIt_ITEM_TXT" / >

    < name of xsl: variable = "vrIt_ITEM_TXT_KEY" / >

    < name of xsl: variable = "vrIt_ITEM_TXT_TAG" / >

    < name of xsl: variable = "vrIt_NOUN_USAGE1" / >

    < name of xsl: variable = "vrIt_NOUN_USAGE1_KEY" / >

    < name of xsl: variable = "vrIt_NOUN_USAGE1_TAG" / >

    < name of xsl: variable = "vrIt_NOUNDESC_USAGE2" / >

    < name of xsl: variable = "vrIt_NOUNDESC_USAGE2_KEY" / >

    < name of xsl: variable = "vrIt_NOUNDESC_USAGE2_TAG" / >

    < name of xsl: variable = "vrIt_PHYDESC_USAGE3" / >

    < name of xsl: variable = "vrIt_PHYDESC_USAGE3_KEY" / >

    < name of xsl: variable = "vrIt_PHYDESC_USAGE3_TAG" / >

    < name of xsl: variable = "vrIt_USAGE4_KEY" / >

    < name of xsl: variable = "vrIt_USAGE4_TAG" / >

    < name of xsl: variable = "vrIt_INDENT_LEVEL" / >

    < name of xsl: variable = "vrIt_ILLUSTRATED_FLAG" / >

    < name of xsl: variable = "numberItem" / >

    < name of xsl: variable = "numberofParts" / >

    <! - declaration of variable for part - >

    < name of xsl: variable = "numberPart" / >

    < name of xsl: variable = "vrPartMarket" / >

    < xsl: template match = "CATALOG" >

    < name of xsl: variable = "vrCATALOG_ID" >

    < xsl: value-of select = "CATALOG_ID" / >

    < / xsl: variable >

    < xsl: for-each select = "GROUP" >

    < name of xsl: variable = "vrGROUP_TYPE_ID" >

    < xsl: value-of select = "GROUP_TYPE_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TOC_ID" >

    < xsl: value-of select = "TOC_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TOC_ALIAS" >

    < xsl: value-of select = "TOC_ALIAS" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TOC_TITLE" >

    < xsl: value-of select = "TOC_TITLE" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TOC_TITLE_KEY" >

    < xsl: value-of select = "TOC_TITLE_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TOC_TITLE_TAG" >

    < xsl: value-of select = "TOC_TITLE_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_ORDER" >

    < xsl: value-of select = "GROUP_ORDER" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_GRAPHIC_ID" >

    < xsl: value-of select = "CHART/GRAPHIC_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_XT_FILE_NAME" >

    < xsl: value-of select = "CHART/XT_FILE_NAME" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_MAPPING_MARKET" >

    < xsl: for-each select = "MAPS/MARKET" >

    <!-< xsl: if test = "text (). = "" >-->

    < xsl: value - of select = "concat(MAPPINGS/MARKET,.,'^')" / >

    <!-< / xsl: if >->

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_GROUP_CODE_TYPE" >

    < xsl: for-each select = "MAPPINGS" >

    < xsl: for-each select = "*" >

    < xsl: if test = "text (). = "and (name () = 'FAMILY' or name = 'ENGINE' name () = 'LINE' or name () ="MODEL_YEAR"name () = 'TRANSMISSION' or name = 'BODY' or name () = 'TRIM' or name = 'MARKET' () or name () = 'SERIES')" > "

    < xsl: value - of select = "concat (name (),' > > ',.,'^ ')" / >

    < / xsl: if >

    < / xsl: foreach >

    < xsl: text > + < / xsl: text >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_GROUP_CODE" >

    < xsl: value-of select = "0" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_LINE_SHOW" >

    < xsl: value-of select = "LINE_SHOW" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_SERIES_SHOW" >

    < xsl: value-of select = "SERIES_SHOW" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_ENGINE_SHOW" >

    < xsl: value-of select = "ENGINE_SHOW" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_BODY_SHOW" >

    < xsl: value-of select = "BODY_SHOW" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TRANS_SHOW" >

    < xsl: value-of select = "TRANS_SHOW" / >

    < / xsl: variable >

    < name of xsl: variable = "vrGROUP_TRIM_SHOW" >

    < xsl: value-of select = "TRIM_SHOW" / >

    < / xsl: variable >

    < name of xsl: variable = "vrSEQ_LINE_SHOW" >

    < xsl: for-each select = "*" >

    < xsl: if test = "text () = 'Y'" >

    < xsl: if test = "name () ="LINE_SHOW"" > LINE_SHOW, < / xsl: if >

    < xsl: if test = "name () ="SERIES_SHOW"" > SERIES_SHOW, < / xsl: if >

    < xsl: if test = "name () ="ENGINE_SHOW"" > ENGINE_SHOW, < / xsl: if >

    < xsl: if test = "name () ="BODY_SHOW"" > BODY_SHOW, < / xsl: if >

    < xsl: if test = "name () ="TRANS_SHOW"" > TRANS_SHOW, < / xsl: if >

    < xsl: if test = "name () ="TRIM_SHOW"" > TRIM_SHOW, < / xsl: if >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < xsl: for-each select = "LOGICAL_ILLUSTRATION" >

    < name of xsl: variable = "numberLogIll" >

    < xsl: Number value = "position()" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_TOC_ID" >

    < xsl: value-of select = "TOC_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_TOC_ALIAS" >

    < xsl: value-of select = "TOC_ALIAS" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_TOC_TITLE" >

    < xsl: value-of select = "TOC_TITLE" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_TOC_TITLE_KEY" >

    < xsl: value-of select = "TOC_TITLE_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_TOC_TITLE_TAG" >

    < xsl: value-of select = "TOC_TITLE_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_GRAPHIC_ID" >

    < xsl: value-of select = "CHART/GRAPHIC_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_XT_FILE_NAME" >

    < xsl: value-of select = "CHART/XT_FILE_NAME" / >

    < / xsl: variable >

    < name of xsl: variable = "vrLogIll_MAPPING_MARKET" >

    < xsl: for-each select = "MAPS/MARKET" >

    <!-< xsl: if test = "text (). = "" >-->

    < xsl: value - of select = "concat(MAPPINGS/MARKET,.,'^')" / >

    <!-< / xsl: if >->

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_LICODE_TYPE" >

    < xsl: for-each select = "MAPPINGS" >

    < xsl: for-each select = "*" >

    < xsl: if test = "text (). = "and (name () = 'FAMILY' or name = 'ENGINE' name () = 'LINE' or name () ="MODEL_YEAR"name () = 'TRANSMISSION' or name = 'BODY' or name () = 'TRIM' or name = 'MARKET' () or name () = 'SERIES')" > "

    < xsl: value - of select = "concat (name (),' > > ',.,'^ ')" / >

    < / xsl: if >

    < / xsl: foreach >

    < xsl: text > + < / xsl: text >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_LICODE" >

    < xsl: value-of select = "0" / >

    < / xsl: variable >

    < xsl: for-each select = "IMAGE" >

    < name of xsl: variable = "numberIllus" >

    < xsl: Number value = "position()" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_TOC_ID" >

    < xsl: value-of select = "TOC_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_TOC_ALIAS" >

    < xsl: value-of select = "TOC_ALIAS" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_TOC_TITLE" >

    < xsl: value-of select = "TOC_TITLE" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_TOC_TITLE_KEY" >

    < xsl: value-of select = "TOC_TITLE_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_TOC_TITLE_TAG" >

    < xsl: value-of select = "TOC_TITLE_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_TOC_SUBTITLE" >

    < xsl: value-of select = "TOC_SUBTITLE" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_GRAPHIC_ID" >

    < xsl: value-of select = "CHART/GRAPHIC_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_MARKET" >

    < xsl: for-each select = "MAPS/MARKET" >

    <!-< xsl: if test = "text (). = "" >-->

    < xsl: value - of select = "concat(MAPPINGS/MARKET,.,'^')" / >

    <!-< / xsl: if >->

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_ICODE_TYPE" >

    < xsl: for-each select = "MAPPINGS" >

    < xsl: for-each select = "*" >

    < xsl: if test = "text (). = "and (name () = 'FAMILY' or name = 'ENGINE' name () = 'LINE' or name () ="MODEL_YEAR"name () = 'TRANSMISSION' or name = 'BODY' or name () = 'TRIM' or name = 'MARKET' () or name () = 'SERIES')" > "

    < xsl: value - of select = "concat (name (),' > > ',.,'^ ')" / >

    < / xsl: if >

    < / xsl: foreach >

    < xsl: text > + < / xsl: text >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_ICODE" >

    < xsl: value-of select = "0" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_XT_FILE_NAME" >

    < xsl: value-of select = "CHART/XT_FILE_NAME" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_NOTE_TXT" >

    < xsl: value-of select = "NOTES/NOTE_TXT" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_NOTE_XT_ID" >

    < xsl: value-of select = "NOTES/XT_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_NOTE_TOC_ID" >

    < xsl: value-of select = "NOTES/TOC_NOTE_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_NOTE_TXT_KEY" >

    < xsl: value-of select = "NOTES/NOTE_TXT_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIll_NOTE_TXT_TAG" >

    < xsl: value-of select = "NOTES/NOTE_TXT_TAG" / >

    < / xsl: variable >

    < xsl: for-each select = "ITEM" >

    < name of xsl: variable = "numberItem" >

    < xsl: Number value = "position()" / >

    < / xsl: variable >

    < name of xsl: variable = "numberofParts" >

    < xsl: value - of select = "count (descendant::PART)" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_ITEM_ID" >

    < xsl: value-of select = "ITEM_ID" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_SEQUENCE_NBR" >

    < xsl: value-of select = "SEQUENCE_NBR" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_ITEM_NBR" >

    < xsl: value-of select = "ITEM_NBR" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_ITEM_TXT_KEY" >

    < xsl: value-of select = "ITEM_TXT_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_ITEM_TXT_TAG" >

    < xsl: value-of select = "ITEM_TXT_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_ITEM_TXT" >

    < xsl: value-of select = "ITEM_TXT" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_NOUN_USAGE1" >

    < xsl: value-of select = "NOUN_USAGE1" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_NOUN_USAGE1_KEY" >

    < xsl: value-of select = "NOUN_USAGE1_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_NOUN_USAGE1_TAG" >

    < xsl: value-of select = "NOUN_USAGE1_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_NOUNDESC_USAGE2" >

    < xsl: value-of select = "NOUNDESC_USAGE2" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_NOUNDESC_USAGE2_KEY" >

    < xsl: value-of select = "NOUNDESC_USAGE2_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_NOUNDESC_USAGE2_TAG" >

    < xsl: value-of select = "NOUNDESC_USAGE2_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_PHYDESC_USAGE3" >

    < xsl: value-of select = "PHYDESC_USAGE3" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_PHYDESC_USAGE3_KEY" >

    < xsl: value-of select = "PHYDESC_USAGE3_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_PHYDESC_USAGE3_TAG" >

    < xsl: value-of select = "PHYDESC_USAGE3_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_USAGE4_KEY" >

    < xsl: value-of select = "USAGE4_KEY" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_USAGE4_TAG" >

    < xsl: value-of select = "USAGE4_TAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_INDENT_LEVEL" >

    < xsl: value-of select = "INDENT_LEVEL" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_ILLUSTRATED_FLAG" >

    < xsl: value-of select = "ILLUSTRATED_FLAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_REQUIRED_FLAG" >

    < xsl: value-of select = "ITEM_APPLICATION/REQUIRED_FLAG" / >

    < / xsl: variable >

    < name of xsl: variable = "vrIt_SERVICEABLE_FLAG" >

    < xsl: value-of select = "ITEM_APPLICATION/SERVICEABLE_FLAG" / >

    < / xsl: variable >

    < xsl: for-each select = "PARTY" >

    < name of xsl: variable = "numberPart" >

    < xsl: Number value = "position()" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartChild" >

    < xsl: value - of select = "count (*)" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartU1" >

    < xsl: value-of select = "NOUN_USAGE1" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartU2" >

    < xsl: value-of select = "NOUNDESC_USAGE2" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartU3" >

    < xsl: value-of select = "PHYDESC_USAGE3" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartTxt" >

    < xsl: value-of select = "ITEM_TXT" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartMarket" >

    < xsl: for-each select = "ON" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(MARKET,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vr_PMARKET" >

    < xsl: for-each select = "ON" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('M','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartEngine" >

    < xsl: for-each select = "ENGINE" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(ENGINE,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PENGINE" >

    < xsl: for-each select = "ENGINE" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('E','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartBody" >

    < xsl: for-each select = "BODY" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(BODY,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PBODY" >

    < xsl: for-each select = "BODY" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('B','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartLine" >

    < xsl: for-each select = "LINE" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(LINE,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PLINE" >

    < xsl: for-each select = "LINE" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('L','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartTrim" >

    < xsl: for-each select = "TRIM" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(TRIM,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PTRIM" >

    < xsl: for-each select = "TRIM" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('R','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartTrimColor" >

    < xsl: for-each select = "TRIM_COLOR" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(TRIM_COLOR,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PTRIMCOLOR" >

    < xsl: for-each select = "TRIM_COLOR" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('C','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartTrimExt" >

    < xsl: for-each select = "TRIM_EXTERIOR" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(TRIM_EXTERIOR,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PTRIMEXT" >

    < xsl: for-each select = "TRIM_EXTERIOR" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('X','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartSeries" >

    < xsl: for-each select = "SERIES" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(SERIES,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PSERIES" >

    < xsl: for-each select = "SERIES" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('Z','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartTrans" >

    < xsl: for-each select = "TRANS" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat(TRANS,.,'^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "var_PTRANS" >

    < xsl: for-each select = "TRANS" >

    < xsl: if test = "text (). = "" >

    < xsl: value - of select = "concat('T','^')" / >

    < / xsl: if >

    < / xsl: foreach >

    < / xsl: variable >

    < name of xsl: variable = "vrPartFamily" >

    < xsl: value - of select = "concat(/CATALOG/APPLICATIONS/FAMILY,'^')" / >

    < / xsl: variable >

    < name of xsl: variable = "var_PFAMILY" >

    < xsl: value - of select = "concat('F','^')" / >

    < / xsl: variable >

    < name of xsl: variable = "vrPartModelYear" >

    < xsl: value - of select = "concat(/CATALOG/APPLICATIONS/MODEL_YEAR,'^')" / >

    < / xsl: variable >

    < name of xsl: variable = "var_PYEAR" >

    < xsl: value - of select = "concat('Y','^')" / >

    < / xsl: variable >

    < name of xsl: variable = "vr_PCODE_TYPE" >

    < xsl: value - of select = "concat($var_PBODY,$var_PTRIMCOLOR,$var_PENGINE,$var_PFAMILY,$var_PLINE,$vr_PMARKET,$var_PTRIM,$var_PTRANS,$var_PTRIMEXT,$var_PYEAR,$var_PSERIES)" / >

    < / xsl: variable >

    < name of xsl: variable = "vr_PCODE" >

    < xsl: value - of select = "concat ($vrPartBody, $vrPartTrimColor, $vrPartEngine, $vrPartFamily, $vrPartLine, $vrPartMarket, $vrPartTrim, $vrPartTrans, $vrPartTrimExt, $vrPartModelYear, $vrPartSeries)" / >

    < / xsl: variable >

    < name of xsl: variable = "varITEM_SALES_CODES" >

    < xsl: value-of select = "ITEM_SALES_CODES" / >

    < / xsl: variable >

    < xsl: value-of select = "$vrCATALOG_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "/ CATALOGUE/APPLICATIONS/MODEL_YEAR" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "/ CATALOGUE/APPLICATIONS/FAMILY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TOC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TOC_ALIAS" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TOC_TITLE_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TOC_TITLE_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_ORDER" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_TOC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_TOC_ALIAS" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_TOC_TITLE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_TOC_TITLE_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_TOC_TITLE_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_TOC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_TOC_ALIAS" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_TOC_TITLE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_TOC_TITLE_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_TOC_TITLE_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_TOC_SUBTITLE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_NOTE_TXT_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_NOTE_TXT_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_GRAPHIC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_XT_FILE_NAME" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_NBR" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_TXT_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_TXT_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_TXT" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUN_USAGE1" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUN_USAGE1_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUN_USAGE1_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUNDESC_USAGE2" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUNDESC_USAGE2_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUNDESC_USAGE2_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_PHYDESC_USAGE3" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_PHYDESC_USAGE3_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_PHYDESC_USAGE3_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_USAGE4_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_USAGE4_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_INDENT_LEVEL" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ILLUSTRATED_FLAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "ITEM_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "PART_NBR" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "PART_NBR_FORMAT" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "QUANTITY" / >

    < xsl: text > | < / xsl: text >

    < xsl: choose >

    < template test = "$numberofParts = 1 and $vrPartU1 =" and $vrPartU2 = "and $vrPartU3 =" and $vrPartTxt = "and $vrPartChild! = 0 ">

    < xsl: value-of select = "$vrIt_NOUN_USAGE1" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUNDESC_USAGE2" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_PHYDESC_USAGE3" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_TXT" / >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "$vrPartU1" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrPartU2" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrPartU3" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrPartTxt" / >

    < / xsl: otherwise >

    < / xsl: choose >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "USAGE_SOURCE" / >

    < xsl: text > | < / xsl: text >

    < xsl: choose >

    < template test = "$varITEM_SALES_CODES =" ">."

    < xsl: text > ST < / xsl: text >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "$varITEM_SALES_CODES" / >

    < / xsl: otherwise >

    < / xsl: choose >

    < xsl: text > | < / xsl: text >

    < xsl: choose >

    < template test = "$numberofParts = 1 and $vrPartU1 =" and $vrPartU2 = "and $vrPartU3 =" and $vrPartTxt = "and $vrPartChild! = 0 ">

    < xsl: value-of select = "$vrIt_NOUN_USAGE1_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUN_USAGE1_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUNDESC_USAGE2_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_NOUNDESC_USAGE2_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_PHYDESC_USAGE3_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_PHYDESC_USAGE3_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_TXT_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_ITEM_TXT_TAG" / >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "NOUN_USAGE1_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "NOUN_USAGE1_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "NOUNDESC_USAGE2_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "NOUNDESC_USAGE2_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "PHYDESC_USAGE3_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "PHYDESC_USAGE3_TAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "ITEM_TXT_KEY" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "ITEM_TXT_TAG" / >

    < / xsl: otherwise >

    < / xsl: choose >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "SEQUENCE_NBR" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TOC_TITLE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_SEQUENCE_NBR" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_GRAPHIC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_XT_FILE_NAME" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_GRAPHIC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrLogIll_XT_FILE_NAME" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$numberIllus" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$numberItem" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$numberPart" / >

    < xsl: text > | < / xsl: text >

    < xsl: choose >

    < template test = "$vrPartChild = 0" > ".

    < xsl: value-of select = "$vrPartChild" / >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "$numberofParts" / >

    < / xsl: otherwise >

    < / xsl: choose >

    < xsl: text > | < / xsl: text >

    < xsl: choose >

    < template test = "substring($vrGROUP_MAPPING_MARKET,1,1) ='^ '" > ".

    < xsl: text > < / xsl: text >

    < / xsl: When >

    < template test = "contains($vrGROUP_MAPPING_MARKET,'^^')" >

    < xsl: text > < / xsl: text >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "$vrGROUP_MAPPING_MARKET" / >

    < / xsl: otherwise >

    < / xsl: choose >

    <!-< xsl: value-of select = "$vrGROUP_MAPPING_MARKET" / >-->

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_GROUP_CODE_TYPE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_GROUP_CODE" / >

    < xsl: text > | < / xsl: text >

    < xsl: choose >

    < template test = "substring($vrIll_MARKET,1,1) ='^ '" > ".

    < xsl: text > < / xsl: text >

    < / xsl: When >

    < template test = "contains($vrIll_MARKET,'^^')" >

    < xsl: text > < / xsl: text >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "$vrIll_MARKET" / >

    < / xsl: otherwise >

    < / xsl: choose >

    <!-< xsl: value-of select = "$vrIll_MARKET" / >-->

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_ICODE_TYPE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_ICODE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$numberLogIll" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrPartMarket" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_PCODE_TYPE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_PCODE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value - of select = "substring($vrIll_NOTE_TXT,1,3999)" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_NOTE_XT_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIll_NOTE_TOC_ID" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_LINE_SHOW" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_SERIES_SHOW" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_ENGINE_SHOW" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_BODY_SHOW" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TRANS_SHOW" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrGROUP_TRIM_SHOW" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrSEQ_LINE_SHOW" / >

    < xsl: text > | < / xsl: text >

    <!-< xsl: value-of select = "$vrLogIll_MAPPING_MARKET" / >-->

    < xsl: choose >

    < template test = "substring($vrLogIll_MAPPING_MARKET,1,1) ='^ '" > ".

    < xsl: text > < / xsl: text >

    < / xsl: When >

    < template test = "contains($vrLogIll_MAPPING_MARKET,'^^')" >

    < xsl: text > < / xsl: text >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: value-of select = "$vrLogIll_MAPPING_MARKET" / >

    < / xsl: otherwise >

    < / xsl: choose >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_LICODE_TYPE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vr_LICODE" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_SERVICEABLE_FLAG" / >

    < xsl: text > | < / xsl: text >

    < xsl: value-of select = "$vrIt_REQUIRED_FLAG" / >

    < xsl: text > # < / xsl: text >

    < / xsl: foreach >

    < / xsl: foreach >

    < / xsl: foreach >

    < / xsl: foreach >

    < / xsl: foreach >

    < / xsl: template >

    [< / xsl: stylesheet >]';

    I am getting error below.

    [Error] Execution (2: 1): ORA-01704: string literal too long.

    Please help me on this

    You cannot insert more than 4000 characters. Use Pl/SQL as below

    DECLARE

    Str VARCHAR2 (32767).

    BEGIN

    Str: =.

    q']

    http://www.w3.org/1999/XSL/transform">

       

     

     

     

     

     

     

     

     

    ++

     

     

     

     

     

     

          

    LINE_SHOW,

    SERIES_SHOW,

    ENGINE_SHOW,

    BODY_SHOW,

    TRANS_SHOW,

    TRIM_SHOW,

                  

      

     

     

    ++

      

                  

       

           

     

    ++

                  

                  

                          

                  

                   

                   

                   

                   

                   

     

     

          

     

          

          

          

          

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    ST

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    |

    #####

    ]';

    INSERT IN the text (A)

    VALUES (str);

    END;

  • How to insert CLOB data in tha table in my database

    I create a table called (annual NUMBER, name VARCHAR and CLOB doc) html page

    IsqlPlus I have run the following procedure


    P4_FIRE_HTML_TRIGGER_ARG EXEC ("OLBA + LEGAL + PSOA + OEJN", file);  file: came the CLOB parameter

    the result parameter is set to the queue:
    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 / / IN" "http://..." >
    < HTML >
    < HEAD >
    < TITLE > ADDS - METARS results form < / TITLE >
    "< LINK REL ="StyleSheet"type =" text/css"HREF="/layout/awc/mystyle.css ">
    < / HEAD >
    < BODY BGCOLOR = "#FFFFFF" >
    < TABLE SUMMARY = "this table is used for formatting only" BORDER = 0 CELLPADDING = 3 CELLSPACING = 0 >
    < TR VALIGN = "top" >
    < TD ALIGN = "left" COLSPAN = "2" >
    < H2 > Aviation digital data Service (ADDS) < / H2 >
    Produced by form of METAR (1858 & #160;) 11 February 2014 UTC) < BR >
    " located at < A HREF =" http://AV .............................
    < Table >
    < /TR >
    < TR VALIGN = "top" >
    < TD ALIGN = "left" COLSPAN = "2" >
    < FONT FACE = "Monospace, Courier" > OLBA 111800Z 01006KT 7000 FEW026 16/11 Q1022 < / POLICE > < BR >
    < FONT FACE = "Monospace, Courier" > LEGAL 111830Z 34005KT 8000 NSC 13/11 Q1021 NOSIG < / POLICE > < BR >
    < FONT FACE = "Monospace, Courier" > PSOA 111830Z 21009KT 9999 - RA BKN016 06/03 Q1003 NOSIG < / POLICE > < BR >
    < FONT FACE = "Monospace, Courier" > OEJN 111800Z 34004KT CAVOK 25/20 Q1012 NOSIG < / POLICE > < BR >
    < Table >
    < /TR >
    < /table >
    < / BODY >
    < / HTML >

    I try inserting the above result in my HtmlPage of the table by a simple insert:
    Values inserted INTO HTMLPAGE (annual, doc)
    (5, 'meatr_taf', ' <!) DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 / / IN" "http://... "
    ... < / HTML > ') values are not inserted just I got a message:
    SP2-0863: iSQL * more treatment

    Can someone help me to insert CLOB data in my table HtmlPage above
    Thank you

    software:

    Form [32 bit] Version 9.0.2.9.0 (Production), oracle JInitiator: Version

    1.3.1.9, WebUtil Version 1.0.2 (Beta), window xp service pack 2 build 2600, Internet Explorer 8

    LOOP
    UTL_HTTP. READ_LINE (RESP, File_Metar, TRUE);
    p2_putlines (File_Metar);
    USING_CLOB. ADD_MORE (1, File_Metar);
    USING_CLOB. LOB_INS (1, 'Metar_taf', File_Metar);
    END LOOP;
    UTL_HTTP. END_RESPONSE (resp);

    You should not use USING_CLOB. LOB_INS (1, 'Metar_taf', File_Metar) inside the Loop.You must use

    LOOP

    UTL_HTTP. READ_LINE (RESP, File_Metar, TRUE);

    p2_putlines (File_Metar);

    USING_CLOB. ADD_MORE (1, File_Metar);

    END LOOP;

  • inserting clob data

    I need to know how to insert a large amount of text to a clob data type in a plsql block.


    Version 10g

    Hi, you can try like this

    first create a table

    SQL> create table temp(col clob);
    
    Table created.
    
    SQL> declare
      2  v_string clob;
      3  begin
      4  for i in 1..10000
      5  loop
      6  v_string:=v_string||'A';
      7  end loop;
      8  insert into temp values (v_string);
      9  end;
     10  /
    
    PL/SQL procedure successfully completed.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select length(col) from temp;
    
    LENGTH(COL)
    -----------
          10000
    

    I hope you understand that if there is problem please let me know.

  • Procedure stored by clob data in table dynamically.

    Hello. Having trouble getting a stored procedure is to dynamically insert clob data in a table.

    CREATE OR REPLACE PROCEDURE EDS.eds_insertclob_sp (tablename in varchar2, clobdata in clob) IS

    BEGIN
    immediate "insert into eds." | TableName. "(clobtext) values (" ' | clobdata | ") ')';
    END eds_insertclob_sp;

    It is not letting me set the clob. If I turn it to varchar it works, but then data limited to 4000 characters. Help appreciated. Thank you.

    Hello

    Use LINKS whenever possible and you won't get in 'hell of quotations' thus:

    MHO%xe>  create table my_clobs (clob_col clob);
    
    Tabel is aangemaakt.
    
    MHO%xe> create or replace procedure eds_insertclob_sp
      2  ( tablename in varchar2
      3  , clobdata in clob
      4  )
      5  as
      6  begin
      7    execute immediate 'insert into '||tablename||' (clob_col) values (:1)' using clobdata;
      8  end eds_insertclob_sp;
      9  /
    
    Procedure is aangemaakt.
    
    MHO%xe> var clob_var clob
    MHO%xe> begin
      2  select lpad('X', 60000, 'X') into :clob_var from dual;
      3  end;
      4  /
    
    PL/SQL-procedure is geslaagd.
    
    MHO%xe> exec eds_insertclob_sp('MY_CLOBS', :clob_var);
    
    PL/SQL-procedure is geslaagd.
    
    MHO%xe> select * from my_clobs;
    
    CLOB_COL
    --------------------------------------------------------------------------------
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    
  • manage the CLOB data delimited by tabs with the newline character

    Hi all

    I have a table with a column of type CLOB data where my data are delimited by tabs. For the new line I Chr (10) as the separator between the lines. Someone knows how to handle this character in order to select these data in separate lines.

    Here is the example:

    create table xx_test1(col1 clob);
    
    insert into xx_test1 values (TO_CLOB('1'||chr(9)||'5467'||chr(9)||'41773'||chr(9)||'5467'||chr(9)||'169407'||chr(9)||'GBP'||chr(9)||'08-Feb-2016'||chr(9)||'08-Feb-2016'||chr(9)||'UK Accrual Invoice'||chr(9)||'UK Accrual - import'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'RDWHMP.03.00025.IND'||chr(9)||''||chr(9)||'300'||chr(9)||'15'||chr(9)||'Each'||chr(9)||'ZZU'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'PL Imported Invoices'||chr(9)||'119'||chr(9)||'229'||chr(9)||'340'||chr(9)||'450'||chr(9)||'560'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'Franchise COGS'||chr(9)||'12'||chr(9)||'13'||chr(9)||'14'||chr(9)||'15'||chr(9)||'Y'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'10'||chr(9)||'0'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''|| chr(10) || '2'||chr(9)||'5467'||chr(9)||'41773'||chr(9)||'5467'||chr(9)||'169407'||chr(9)||'GBP'||chr(9)||'08-Feb-2016'||chr(9)||'08-Feb-2016'||chr(9)||'UK Accrual Invoice'||chr(9)||'UK Accrual - import'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'RDWHMP.03.00025.IND'||chr(9)||''||chr(9)||'10'||chr(9)||'15'||chr(9)||'Each'||chr(9)||'ZZU'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'PL Imported Invoices'||chr(9)||'120'||chr(9)||'230'||chr(9)||'341'||chr(9)||'451'||chr(9)||'561'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'Franchise COGS'||chr(9)||'12'||chr(9)||'13'||chr(9)||'14'||chr(9)||'15'||chr(9)||'Y'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||'10'||chr(9)||'0'||chr(9)||''||chr(9)||''||chr(9)||''||chr(9)||''));
    
    
    
    
    
    
    
    
    

    I'll try this one, but it does not work. The last column is not correct and it returns the value of the next line and also does not continue to the end (I presume it's due to the position of the character hardcoded in regexp_substr). Any ideas how to handle?

      WITH c_file_imp_data
             
              AS
              (SELECT dbms_lob.substr(col1, 32767, 1) src
                 FROM xx_test1)
             
             SELECT
             --regexp_subsr is finding the position of the x occcurrance of a tab delimitter
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 1), chr(9))), --RECORD_ID
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 2), chr(9))), --BILL_TO_CUSTOMER_NUMBER,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 3), chr(9))), -- BILL_TO_LOCATION,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 4), chr(9))), -- SHIP_TO_CUSTOMER_NUMBER,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 5), chr(9))), -- SHIP_TO_LOCATION,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 6), chr(9)), -- CURRENCY,
              to_date(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 7), chr(9)),
                      'DD-MON-YYYY'), -- GL_DATE,
              to_date(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 8), chr(9)),
                      'DD-MON-YYYY'), -- TRANSACTION_DATE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 9), chr(9)), -- TRANSACTION_TYPE_NAME,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 10), chr(9)), -- TRANSACTION_SOURCE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 11), chr(9)), -- TERMS,
              to_date(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 12), chr(9)),
                      'DD-MON-YYYY'), -- DUE_DATE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 13), chr(9)), -- PAYMENT_METHOD,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 14), chr(9))), -- SALESREP_NUMBER,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 15), chr(9)), -- ITEM,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 16), chr(9)), -- DESCRIPTION,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 17), chr(9))), -- QUANTITY,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 18), chr(9))), -- UNIT_SELLING_PRICE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 19), chr(9)), -- UNIT_OF_MEASURE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 20), chr(9)), -- WAREHOUSE,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 21), chr(9))), -- TAX_RATE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 22), chr(9)), -- TAX_CODE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 23), chr(9)), -- GL_ACCOUNT_STRING,
              to_number(rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 24), chr(9))), -- CURRENCY_EXCHANGE_RATE,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 25), chr(9)), -- LINE_TRX_DFF_CONTEXT_VAL,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 26), chr(9)), -- LINE_TRANSACTION_FIELD1,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 27), chr(9)), -- LINE_TRANSACTION_FIELD2,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 28), chr(9)), -- LINE_TRANSACTION_FIELD3,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 29), chr(9)), -- LINE_TRANSACTION_FIELD4,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 30), chr(9)), -- LINE_TRANSACTION_FIELD5,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 31), chr(9)), -- LINE_TRANSACTION_FIELD6,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 32), chr(9)), -- LINE_TRANSACTION_FIELD7,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 33), chr(9)), -- LINE_TRANSACTION_FIELD8,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 34), chr(9)), -- LINE_TRANSACTION_FIELD9,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 35), chr(9)), -- LINE_TRANSACTION_FIELD10,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 36), chr(9)), -- LINE_TRANSACTION_FIELD11,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 37), chr(9)), -- LINE_TRANSACTION_FIELD12,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 38), chr(9)), -- LINE_TRANSACTION_FIELD13,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 39), chr(9)), -- LINE_TRANSACTION_FIELD14,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 40), chr(9)), -- LINE_TRANSACTION_FIELD15,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 41), chr(9)), -- INV_LINE_INFO_DFF_CONT_VAL,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 42), chr(9)), -- NO_ANIMALS,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 43), chr(9)), -- MX_WEIGHT,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 44), chr(9)), -- MX_SLAUGHTER,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 45), chr(9)), -- REBILLED,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 46), chr(9)), -- NON_STAT,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 47), chr(9)), -- ATTRIBUTE12,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 48), chr(9)), -- ATTRIBUTE13,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 49), chr(9)), -- ATTRIBUTE14,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 50), chr(9)), -- ATTRIBUTE15,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 51), chr(9)), -- ATTRIBUTE8,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 52), chr(9)), -- ATTRIBUTE11,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 53), chr(9)), -- ATTRIBUTE2,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 54), chr(9)), -- ATTRIBUTE3,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 55), chr(9)), -- ATTRIBUTE4,
              rtrim(regexp_substr(src, '[^' || chr(9) || ']*' || chr(9) || '', 1, 56), chr(9)) -- ATTRIBUTE9
            
               FROM c_file_imp_data
    
    
    
    
    
    

    Oracle DB version: 12 c

    Thanks in advance,

    Alex

    with

    xx_test1 as

    (select TO_CLOB ('1' |)) Chr (9) | "5467' | Chr (9) | "41773' | Chr (9) | "5467' | Chr (9) | ' 169407' | Chr (9) | ' GBP'. Chr (9) | "February 8, 2016'. Chr (9) | "February 8, 2016'. Chr (9) | "Bill regularization UK' | Chr (9) | "Accumulation of UK - import '. Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | ' RDWHMP.03.00025.IND' | Chr (9): "| Chr (9) | ' 300'. Chr (9) | ' 15' | Chr (9) | ' Each ' | Chr (9) | ' ZZOU ' | Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | "PL imported invoices | Chr (9) | ' 119' | Chr (9) | ' 229'. Chr (9) | ' 340' | Chr (9) | "450 | Chr (9) | ' 560' | Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | "Franchise of the WORKINGS. Chr (9) | ' 12'. Chr (9) | ' 13'. Chr (9) | ' 14'. Chr (9) | ' 15' | Chr (9) | » Y'|| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | ' 10'. Chr (9) | » 0' || Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (10) | '2'|| Chr (9) | "5467' | Chr (9) | "41773' | Chr (9) | "5467' | Chr (9) | ' 169407' | Chr (9) | ' GBP'. Chr (9) | "February 8, 2016'. Chr (9) | "February 8, 2016'. Chr (9) | "Bill regularization UK' | Chr (9) | "Accumulation of UK - import '. Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | ' RDWHMP.03.00025.IND' | Chr (9): "| Chr (9) | ' 10'. Chr (9) | ' 15' | Chr (9) | ' Each ' | Chr (9) | ' ZZOU ' | Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | "PL imported invoices | Chr (9) | ' 120'. Chr (9) | ' 230'. Chr (9) | ' 341'. Chr (9) | ' 451' | Chr (9) | "561' | Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | "Franchise of the WORKINGS. Chr (9) | ' 12'. Chr (9) | ' 13'. Chr (9) | ' 14'. Chr (9) | ' 15' | Chr (9) | » Y'|| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | ' 10'. Chr (9) | » 0' || Chr (9): "| Chr (9): "| Chr (9): "| Chr (9) | ") the_clob

    of the double

    )

    Select x.lne

    of xx_test1 t.

    XMLTable ('/ a/b ')

    from xmltype ('' |) Replace (t.the_clob, Chr (10),''): '')

    path of ESA varchar2 columns (4000) '.'

    ) x


    ESA
    1 5467 41773 5467 169407 GBP 8 February 2016 8 February 2016 regularization invoice accounting UK UK - import RDWHMP.03.00025.IND 15 300 each ZZU PL Imported bills 119 229 340 450 560 Franchise COGS 12 13 14 15 Y 10 0
    2 5467 41773 5467 169407 GBP 8 February 2016 8 February 2016 regularization invoice accounting UK UK - import RDWHMP.03.00025.IND 10 15 imported bills each PL ZZU 120 230 341 451 561 Franchise COGS 12 13 14 15 Y 10 0


    It seems that you know how to do the rest


    Concerning

    Etbin

  • UPDATE CLOB data

    Hello
    I have Create table ABC (Rec_number number, rcc clob) table,

    Insert into abc (rec_number, rcc)
    values(1,'n/A')

    I wish to update the CCR filed
    abc update
    Set the rcc = null
    where rcc = "n/a";
    but
    IT is throwing error data type mismatch.
    Give me a solution how can I update the CLOB data type.
    Appreciate your help and your response.
    update abc
    set rcc= EMPTY_CLOB()
    where dbms_lob.compare(rcc, to_clob('n/a')) = 0;
    
  • Problem with the length of a CLOB data type

    Hello

    In my application, I have a page with an interactive report of written blogs - on this page, you can add a new blog (text box - CLOB data type), discovered a blog or edit a blog.
    There is something going wrong with the size of the blog text. I know APEX cannot accept that 32K text and I've seen the great value saving thread, but this isn't the solution to my problem.

    The problem is that when I add a blog with say about 4000 characters, it is saved in the database, but the interactive report, when I click on the view or edit icons for this blog, the blog text field appears empty. For small items (< 4000 characters), there is no problem.
    Anyone know why this is happening and how to fix this?
    Thank you!

    There seems to be a bug in the calculation of the value of the element Source when the Source Type is a SQL query and the data type of the selected column is CLOB. I'll file a bug for this. For now, I have demonstrated how you can use a type of function PL/SQL source instead. Please see point P3_TEXT:

    beginfor c1 in (select blog_textfrom blogwhere blog_id = :P3_BLOG_ID) loop  return c1.blog_text;end loop;return null;end;
    

    Scott

  • How to extract a value of sql xml column clob data

    Hi guys,.

    I need help with the following. I have a column with data type xml (clob data). I need to extract the information in the < RI4 > tag and the < RI6 > tag.
    I truncated the data, but there is a repetition of the < RI4 > tag and consequenty internal to that tag RI6. However, each tag RI4 and RI6 has different data.

    I would be grateful if you can help me with this:

    <a xsi:schemaLocation="som location.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:somlocation">
      <b>Some stuff here</b>
      <c>
      <someinfo>blah</someinfo>
      <someinfo2>blah2</someinfo2>
      </c>
      <EffectiveDateTime>2015-10-01T00:00:00+10:00</EffectiveDateTime>
      <CurrencyCode>AUD</CurrencyCode>
      <RequiredInformation>
      <RequiredInformation2>
      <RequiredInformation3>
      <RI4>someinfo</RI4>
      <RI5>
      <RI6>
      <a1>1</a1>
      <b1>9.13</b1>
      </RI6>
      <RI6>
      <a1>2</a1>
      <b1>8.75</b1>
      </RI6>
      <RI6>
      <a1>3</a1>
      <b1>78.90</b1>
      </RI6>
      <RI6>
      <a1>4</a1>
      <b1>200</b1>
      </RI6>
      <RI6>
      <a1>5</a1>
      <b1>17.59</b1>
      </RI6>
      </RI5>
      </RequiredInformation3>
      </RequiredInformation2>
      </RequiredInformation>
      </a>
    

    I think that since it's the repetition I might need to make some sort of PL/SQL programming, but I really need help here to build this announcement also a way to extract the information.

    Any help would be greatly appreciated.

    Kind regards

    You can parse your XML like this

    SQL> with t
      2  as
      3  (
      4  select
      5  '
      6      Some stuff here
      7      
      8          blah
      9          blah2
     10      
     11      2015-10-01T00:00:00+10:00
     12      AUD
     13      
     14          
     15              
     16                  someinfo
     17                  
     18                      
     19                          1
     20                          9.13
     21                      
     22                      
     23                          2
     24                          8.75
     25                      
     26                      
     27                          3
     28                          78.90
     29                      
     30                      
     31                          4
     32                          200
     33                      
     34                      
     35                          5
     36                          17.59
     37                      
     38                  
     39              
     40          
     41      
     42  ' xml_str
     43    from dual
     44   )
     45  select t1.ri4, t2.a1, t2.b1
     46    from t
     47       , xmltable
     48         (
     49            xmlnamespaces(default 'urn:somlocation', 'http://www.w3.org/2001/XMLSchema-instance' as "xsi")
     50         ,  '/a/RequiredInformation/RequiredInformation2/RequiredInformation3' passing xmltype(t.xml_str)
     51            columns
     52               ri4 varchar2(10) path 'RI4'
     53             , ri5 xmltype path 'RI5'
     54         ) t1
     55       , xmltable
     56         (
     57            xmlnamespaces(default 'urn:somlocation')
     58          , '/RI5/RI6' passing t1.ri5
     59            columns
     60               a1 number path 'a1'
     61             , b1 number path 'b1'
     62         ) t2;
    
    RI4                A1         B1
    ---------- ---------- ----------
    someinfo            1       9.13
    someinfo            2       8.75
    someinfo            3       78.9
    someinfo            4        200
    someinfo            5      17.59
    
    SQL>
    
  • Find the date in clob data

    Hi all

    In the abc table, I would find the Id name if any later date is available in the variable 'data' (CLOB data type).

    I'm not able to go forward. can someone help me

    Output must be Id 102 and 103, the date indicated is greater than the current date.

    with abc as

    (

    Select 101 as id, 'Prime Minister arrived in Melbourne for the last leg of his tour of four cities in Australia on March 1, 2014 "as double data

    Union

    Select 102, "the prior reading of Singapore third quarter December 1, 2015 showing no response" of the double

    Union

    Select 103, ' there is no symptom of Malaria after December 15, 2104 meaning vaccine properly work ' from dual

    )

    Select * from ABC

    where the data like "trunc (sysdate) %.

    Thanks in advance

    This model ' [(0123456789)] + [()] + ((Jan) |) () Feb) | (Mar) | (APR) | (May). (Jun) | (Jul) | (August). (MS) | (Oct) | (Nov). (Dec)) [()] + [(0123456789)] +' finds the appropriate data now or later, does not matter.  We can use this model.

    use regexp_count with this model.  regexp_count returns "there are how many days" to open this model.

    using regexp_count for your sql output:

    ___regexp_count___ your data                                                              

    2 Prime Minister arrived in Melbourne, for the last leg of his tour of four cities in the Australia, March 1, 2014 and April 3, 2100
    2 The r1eading of 234/12 ahead of Singapore December 1, 2012, for the third quarter on December 1, 2015, showing no response
    1 There is no malaria symptom Minister after November 19, 2014 meaning vaccine properly work

    help link for regexp: Oracle of regular Expressions

    hope this helps

    Celal Ozdemir

  • Simple question of CLOB data type

    declare
    r clob;
    begin
      r := lpad('0',32768,'0');
    end;
    

    ORA-06502: PL/SQL: digital or value error: character string buffer too small

    ORA-06512: at line 4 level

    06502 00000 - "PL/SQL: digital error or the value of %s.

    So that tells me that an in PL/SQL CLOB data type cannot be as big as a VARCHAR2, correct? A variable in a PL/SQL can be greater than this?

    Thank you!

    So that tells me that an in PL/SQL CLOB data type cannot be as big as a VARCHAR2, correct?

    NO - that tells you that LPAD works with VARCHAR2 and function is what the limit.

  • Display html clob data

    Hello Experts,

    I am storing awr reports in a clob column in a table by calling the dbms_workload_respository.awr_report_html procedure and store the returned data in the clob with dbid column, begin and end the component id snap in the numeric columns. My requirement is to display a drop down of these 3 columns together and based on the selection to get the clob column data and visualize the awr in html format in the same page or another page. I don't know a lot of apex, need help on how to achieve this.

    I searched the Oracle Apex forum and tried below 2 things but maybe I'm missing something in the process, can someone please help me and tell me how to display html data stored in the clob.

    https://KR.forums.Oracle.com/forums/thread.jspa?threadID=723735

    Display the content of CLOB column with markup

    I use 4 Apex with Oracle 11.1 db.

    >

    Please update your forum profile with a real handle instead of '907426 '.

    I am storing awr reports in a clob column in a table by calling the dbms_workload_respository.awr_report_html procedure and store the returned data in the clob with dbid column, begin and end the component id snap in the numeric columns. My requirement is to display a drop down of these 3 columns together and based on the selection to get the clob column data and visualize the awr in html format in the same page or another page. I don't know a lot of apex, need help on how to achieve this.

    I searched the Oracle Apex forum and tried below 2 things but maybe I'm missing something in the process, can someone please help me and tell me how to display html data stored in the clob.

    https://KR.forums.Oracle.com/forums/thread.jspa?threadID=723735

    Display the content of CLOB column with markup

    These threads treat to exceed the maximum size of 32 KB of an element of the APEX to make available for the edition of CLOB data. It is much easier to simply display the contents of a CLOB. Create an dynamic PL/SQL content area that uses htp.p to generate the content of CLOB. This method also has a limit of 32 K maximum output, and the size of the AWR reports will be much greater than that. To send safely from the CLOB in the browser, it is required for the output of the buffer in chunks of 32 K or less as shown + {message identifier: = 4497571} +.

  • Retrieves the CLOB data when you use the keyword DISTINCT to the other columns

    I have a question about how to recover the CLOB data.

    The requirement is something that there are about 20 + columns I need to recover around 5 tables joined in the select statement.
    Since the result set after that join will also duplicate values, I need to use the distinct keyword to filter the result set.
    But there is in the columns of 20 + 2 columns to CLOB data I need to recover.

    Whenever I have use SEPARATE, I'm ORA-00932: inconsistent data types: expected - received the CLOB error.

    I know that this DISTINCT keyword cannot be used for CLOB data types.

    So can anyone here help me with any work around / another way to get the CLOB value in the QUERY SELECT.

    So please help me out in the present.

    Hello
    This forum is for problems using SQL * Developer. If the problem only occurs if you are using SQL * Developer then please give us the SQL code that you are running.
    If it happens in SQLPLUS then, it would be preferable to raise it in the SQL Forum-

    Forum: SQL and PL/SQL

    SQL and PL/SQL

    This forum is for problems using SQL * Developer.

    Kind regards
    Mike

  • What is recommended to load existing files CLOB data?

    In another post (Re: using TYPE for the different data types Billy gave a great example of why you don't want to build on-the-fly SQL and what is the significance of the performance improvements are using shareable cursors.)

    Part of the question that the OP was trying to solve, however, seems to come back several times and I saw a good response in any one place.

    So for Billy or other, which is the recommended method for loading CLOB data (and only the existing files CLOB data.

    1. the user and non-clob CLOB data.
    2. the non-clob data are loaded (or can easily be loaded) in several ways using treatment in bulk.
    3. the CLOB data exist in a file on a file system; each file must be associated with a unique ID value.
    4 assume that all the files are in a physical location, but not on the database server.
    5. Suppose you use 11 GR 2 (you can use an earlier version if you just want to mention what it is and why you chose it.

    What options are available for loading CLOB data in Oracle and what is the recommended option?

    Whether to actually load the data into a CLOB or leave it on the file system with just a pointer from the database using a BFILE type is more a matter of architecture. Personally, I'd rather have LOB data in the database where you have the options of much more robust security, where it will include database backups, and where I don't have to worry that someone will inadvertently move files on the disk and break links to them. On the other hand, have the files on the file system allows you to use all the operating system utilities you have to manage or manipulate them without having to unload and reload (but you can use XML DB to expose LOB data in the database as if they were on a file server (if you want to go on the configuration path that). It reduces the size of the backup of the database (even if it increases the size of the file system backup). And it can allow you to use the less expensive disk to store large amounts of LOB data (although you might do the same in Oracle with the LOB data in a separate tablespace).

    If you want to load LOB data, my preference would certainly be to have files on the database server (or a drive mounted on the database server) so that I could use external tables rather than SQL * Loader that makes it much easier to make loads in parallel and to trigger charges of the ETL process which is , presumably, running in the database.

    Justin

Maybe you are looking for

  • Upgrade CPU R400 options

    Hi, I have R400 with Celeron 575 M 2 GB of RAM, but there is a big problem - this really laptop does not work with Windows 7. I check in wikipedia that is Socket P, some of these processors supporting, but I do not know will be they really work T5670

  • Transfer task failed in UCS

    I tried to download the new firmware version of UCS in my UCS fabric interconnect using FileZilla and I get the error "550 file not found" see sreen capture below. What could be the problem?

  • The upgrade of my Lenovo E420

    Hello I want to upgrade my laptop hardware E420 total increase my performance, to speed up my computer.  My question is, what are all the things I can spend? I know that cpu and gpu, you can't.  I've already updated my ram from 4 GB to 8 GB IAM think

  • Indexing - transfer of page numbers

    Indexing questionAfter having a terrible time of indexing of a book.I do not use the indexing InDesign feature because it requires knowing the structure of the index as we create the book. Without object in the structure of this book.Background: book

  • Why my form does not compute?

    Can someone please tell me why all of a sudden that nothing does not compute when it was working fine earlier? I moved that a few small things around, but can't see why it won't calculate at all.http://www.milesmemorials.com/estimator.html