Concatenating clobs

Hi
I have a question on concatenating many small clobs into a large. DB = 11.2.0.1.
The following is a sample set of data;
create table t_bi001_payment
(customer_number number
,payment clob
begin
for i in 1..1000 loop
insert into t_bi001_payment (customer_number
                            ,payment)
values  
(1
,'200003783511655968                   000000000000100000320000000000100
26Kalles Plåt AB
27Storgatan 2                        12345
28Storåker
29005500001234
210003783511                    898540000000000000500002200023000011100
26Kalles Plåt AB
27Storgatan 2                        12345
28Storåker
2900550000' || lpad(i, 4, '0'));
end loop;
commit;
end;
/There are thousands of such clobs, which have to be concatenated per customer into a single clob.
Each clob should start on a new line.
The first technique I used was connect by, which I picked up from; http://www.williamrobertson.net/
create table abc (c clob)
insert into abc (c)
select ltrim(max(sys_connect_by_path(payment,',')) keep (dense_rank last order by curr),',') as clob_val
from   (select customer_number
              ,payment
              ,row_number() over (partition by customer_number order by customer_number) AS curr,
               row_number() over (partition by customer_number order by customer_number) -1 AS prev
        from   t_bi001_payment)
group by customer_number
connect by prev = prior curr and customer_number = prior customer_number
start with curr = 1
commit
/The above statement returns error:
ORA-01489: result of string concatenation is too long
The following statement is an alternative method:
insert into abc (c)
select to_clob(concatenated)
from
select   xmlagg (xmlelement (c, payment || chr(13))).extract ('//text()') as concatenated
from     t_bi001_payment
group by customer_number
commit
/The above statement returns a similar error, but different message:
ORA-19011: Character string buffer too small
I realise that in both cases the SQL 4000 varchar2 limit has been reached.
The question I have is how can I concatenate hundreds or possibly
thousands of clobs (all relatively small, mostly around 1 or 2k)
into a single larger clob using SQL without having to revert to PL/SQL ?
thx
Edited by: bluefrog on Mar 8, 2011 10:52 AM

Oddly, I was just looking at the following example code in relation to another thread.
This is a user defined aggregate function for concatenating clobs...
create or replace
  type clobagg_type as object(
                              text clob,
                              static function ODCIAggregateInitialize(
                                                                      sctx in out clobagg_type
                                return number,
                              member function ODCIAggregateIterate(
                                                                   self  in out clobagg_type,
                                                                   value in     clob
                                return number,
                              member function ODCIAggregateTerminate(
                                                                     self        in     clobagg_type,
                                                                     returnvalue    out clob,
                                                                     flags       in     number
                                return number,
                              member function ODCIAggregateMerge(
                                                                 self in out clobagg_type,
                                                                 ctx2 in     clobagg_type
                                return number
create or replace
  type body clobagg_type
    is
      static function ODCIAggregateInitialize(
                                              sctx in out clobagg_type
        return number
        is
        begin
            sctx := clobagg_type(null) ;
            return ODCIConst.Success ;
      end;
      member function ODCIAggregateIterate(
                                           self  in out clobagg_type,
                                           value in     clob
        return number
        is
        begin
            self.text := self.text || value ;
            return ODCIConst.Success;
      end;
      member function ODCIAggregateTerminate(
                                             self        in     clobagg_type,
                                             returnvalue    out clob,
                                             flags       in     number
        return number
        is
        begin
            returnValue := self.text;
            return ODCIConst.Success;
        end;
      member function ODCIAggregateMerge(
                                         self in out clobagg_type ,
                                         ctx2 in     clobagg_type
        return number
        is
        begin
            self.text := self.text || ctx2.text;
            return ODCIConst.Success;
        end;
end;
create or replace
  function clobagg(
                   input clob
    return clob
    deterministic
    parallel_enable
    aggregate using clobagg_type;
SQL> select trim(',' from clobagg(ename||',')) as enames from emp;
ENAMES
SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
SQL>Not my code, just one I've picked up from elsewhere over time.

Similar Messages

  • Error raised when concatenating to CLOB using implicit to_char conversion

    Hi there,
    Please consider the code below (Oracle 11.1.0.7.0):
    DECLARE
      c CLOB;
    BEGIN
      FOR i IN 1..10
      LOOP
        -- Please uncomment ONE of the lines below
        c := c ||  LPAD('x', 8000, 'z') || i; -- raises error ora-06502
        --c := c || (LPAD('x', 8000, 'z') || i);  -- works
        --c := c ||  LPAD('x', 8000, 'z') || to_char(i);  -- works
      END LOOP;
    END;Ok, maybe making use of implicit type conversion is not the best thing to do, but just out of curiosity is there any explanation for this error to happen?
    It seems that, when implicit conversion is involved without the aid of brackets, Oracle tries to convert the whole thing to varchar2 before concatenating it to the clob, raising the error.
    Thanks
    Luis

    Hi,
    Accordingly link below, I think this behavior can be explained
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/datatypes.htm#CIHGBADF
    Case 1
    c := c ||  LPAD('x', 8000, 'z') || i
    How it going
    1. Evaluate expression  res1 = LPAD('x', 8000, 'z')
    2. Next oracle must to evaluate  c||res1 where c is clob and res1 is varchar2
    3. Oracle can and choose implicit conversation res1 to clob
    4. Evaluate expression  res2 = c||to_clob(res1);  where res2 now is clob
    5. Next oracle must to evaluate  res2||i where res2 is clob and i is number
    6. Oracle can implicitly convert number only to varchar2 not to clob so he choose implicit conversation i to varchar2
    6.1 Oracle implicitly try convert res2 to varchar2 and when res2 size more then 32627 then he raise error ORA-06502Case 2
    c := c || (LPAD('x', 8000, 'z') || i)
    How it going
    1. Evaluate expression  res1 = LPAD('x', 8000, 'z')
    2. Next oracle must to evaluate  res1||i where res1 is varchar2 and i is number
    3. So he convert i to varchar2 and evaluate res2 = res1||to_char(i)
    4. Next oracle must to evaluate  c||res2 where res2 is varchar2 and c is clob
    5. So he convert res2 to clob and evaluate c||to_clob(res2)Case 3
    c := c ||  LPAD('x', 8000, 'z') || to_char(i)
    How it going
    0. Evaluate res0 = to_char(i)
    1. Evaluate expression  res1 = LPAD('x', 8000, 'z')
    2. Next oracle must to evaluate  c||res1 where c is clob and res1 is varchar2
    3. Oracle can and choose implicit conversation res1 to clob
    4. Evaluate expression  res2 = c||to_clob(res1);  where res2 now is clob
    5. Next oracle must to evaluate  res2||res0 where res2 is clob and res0 is varchar2
    6. He evaluate  to_clob(res0)||res2

  • Optimize Clob concatenation

    Hi, I have a stored proc that return a string containing a concatenation of the result of a select on a unique column.
    The code is about the following :
    CREATE OR REPLACE PROCEDURE pGetAllProductSpec (ProdId in Varchar2 , CaracLob out clob) IS
    len BINARY_INTEGER := 32767;
    CURSOR c1 (prod_id varchar2) IS
         SELECT PRODUCT_SPEC FROM PRODUCT_SPECIFICATION
         WHERE PRODUCT_ID = prod_id ;
    BEGIN
    DBMS_LOB.CREATETEMPORARY(Caraclob, TRUE);
    FOR product_carac IN c1( ProdId) LOOP
    len:=length(product_carac.PRODUCT_SPEC);
    dbms_lob.WRITEAPPEND(CaracLob, len, product_carac.PRODUCT_SPEC);
    END LOOP;
    END;
    It works quite well, but I find that the loop to concatenate the result take too much time.
    I need a Clob because, I don't know exactly the length of the result
    I would like to optimize it. Has anyone a suggest ?

    Also, benchmark the use of bulk operations to see if you can benefit.
    SQL> DECLARE
      2      vclob        CLOB;
      3      vchar_buffer VARCHAR2(32767);
      4  BEGIN
      5      dbms_lob.createtemporary(vclob,
      6                               cache => TRUE);
      7      vchar_buffer := NULL;
      8
      9      FOR rec IN (SELECT text FROM all_source)
    10      LOOP
    11          IF length(vchar_buffer) + length(rec.text) > 32767
    12          THEN
    13              dbms_lob.writeappend(vclob,
    14                                   length(vchar_buffer),
    15                                   vchar_buffer);
    16              vchar_buffer := NULL;
    17          END IF;
    18          vchar_buffer := vchar_buffer || rec.text;
    19      END LOOP;
    20      dbms_lob.writeappend(vclob,
    21                           length(vchar_buffer),
    22                           vchar_buffer);
    23  END;
    24  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.13
    SQL> DECLARE
      2      vclob        CLOB;
      3      vchar_buffer VARCHAR2(32767);
      4      CURSOR cur IS
      5          SELECT text FROM all_source;
      6      TYPE rec_table IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
      7      rec_tab rec_table;
      8  BEGIN
      9      dbms_lob.createtemporary(vclob,
    10                               cache => TRUE);
    11      vchar_buffer := NULL;
    12
    13      OPEN cur;
    14      LOOP
    15          rec_tab.DELETE;
    16          FETCH cur BULK COLLECT
    17              INTO rec_tab LIMIT 100;
    18          FOR idx IN 1 .. rec_tab.COUNT
    19          LOOP
    20              IF length(vchar_buffer) + length(rec_tab(idx)) > 32767
    21              THEN
    22                  dbms_lob.writeappend(vclob,
    23                                       length(vchar_buffer),
    24                                       vchar_buffer);
    25                  vchar_buffer := NULL;
    26              END IF;
    27              vchar_buffer := vchar_buffer || rec_tab(idx);
    28          END LOOP;
    29          EXIT WHEN cur%NOTFOUND ;
    30      END LOOP;
    31      CLOSE cur;
    32      dbms_lob.writeappend(vclob,
    33                           length(vchar_buffer),
    34                           vchar_buffer);
    35  END;
    36  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.70
    SQL>

  • Insert concatenated data from Varchar2 to Clob

    Hi,
    I have a table with the following structure:
    create table logmst (logno varchar2(10), log_detail1 varchar2(4000), log_detail2(4000));
    I would like to concatenate the data from log_detail1 and log_Detail2 into a Clob datatype. So, i have created another table:
    create table test(id varchar2(10), filedesc clob default empty_clob());
    I tried:
    insert into test (id, filedesc) select logno, to_clob(log_Detail1 || log_Detail2) from logmst;
    System shows ORA-01489: result of string concatenation is too long.
    Can somebody help? Thanks in advance.

    You have to write a small procedure. You cannot achieve this using a SQL statment.
    Declare
       myClob CLOB;
       logNo logMst.logNo%type;
       col1 logmst.log_detail1%type;
       col2 logmst.log_detail2%type;
       length_col1 number;
    begin
        For rec in (select logNo, log_Detail1, log_Detail2 from logMst)
        loop
                  logNo := rec.LogNo;
                  col1 := rec.Log_Detail1;
                  col2 := rec.Log_Detail2;
                     myClob := empty_clob();
                    dbms_lob.createtemporary(myClob, TRUE);
                    length_col1 := length(col1);
                    dbms_lob.write(myClob , length_col1,1,col1);
                    dbms_lob.write(myClob , length(col2), length_col1+1,col1);
                   -- Write here SQL statemnt to write this CLOB to your table...
        end loop;
    end;Thanks,
    Dharmesh Patel

  • String literal too long error while invoking a package with clob variable

    I have a package.One of the input variables of the procedure in packae is clob.
    I want to invoke this package with a huge clob as input.
    when i invoke this package like that i am getting following error
    PLS-00172 string literal too long
    can't we pass clob(huge clob) as input .is there any solution for that ?
    Thanks
    Pramod Garre

    842802 wrote:
    If insert this data into a table , from sql prompt still i get the same error.Do you mean SQL*Plus? Then there is buffer limitation and it is better to split literal into, let say 1000 character chunks:
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 29 16:17:26 2011
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
      6  from dual;
    TO_CLOB('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    SQL> SY.

  • Combining clob taking too much time - need help

    Hello,
    I want to append clob values into another clob value like
    declare
    v_temp clob;
    v_c1_temp clob;
    cursor c1 as select clob_data from t;
    -- here t table contains clob_data column holding clob data
    -- t table have more then 1500 rows
    begin
    v_temp := '';
    open c1 into v_c1_temp;
    loop
    v_temp := v_temp + v_c1_temp; --------- combining clob (concat may be used)
    end loop;
    close(c1);
    end;
    above part also repeats in outer loop (not shown here)
    my problem is :- it is taking too much time - you dont believe 90% more time due to that concatenation.
    is it any smart way to do same thing?
    It will be very helpful to me.

    Hi ,
    You should also always try and have the latest BI content patch installed but I don't think this is the problem. It seems that there
    are alot of objects to collect. Under 'grouping' you can select the option 'only necessary objects', please check if you can
    use this option to  install the objects that you need from content.
    Best Regards,
    Des.

  • How to use PLSQL CLOB IN WORKFLOW

    Dear all,
    I have follwoing query with workflow.
    I have developed FYI WF.
    1) In my WF mail, I am getting click here to respond.
    I want to hide this.
    Pl. let me know how to do that?
    2) I have developed a workflow with Document type.
    I am calling a PL/SQL CLOB procedure to pass my values( 4 columns from a table)
    I need to pass approximately 70 to 100 rows to clob.
    when I pass 14 rows, I am not getting any error.
    where as if I pass morethen 15 rows, I am getting follwoing error
    "ORA-06502: PL/SQL: numeric or value error ORA-06512: at "APPS.WF_NOTIFICATION", line 5046 ORA-06512: at line 5 "
    Pl. let me know, do I need to setup any thing in workflow from my side

    Hi,
    I'm not sure whether it is because of the length of variable.
    However, did you use concatenation (||) to store the value in the varchar variable before putting it into the CLOB variable?
    If so, perhaps you forget to reset the varchar variable inside the loop, thus making it longer and longer each loop.
    You should empty the varchar variable by
    loop
      l_string := '';
      -- your code, perhaps concat the variable
      l_string := l_string || 'blah blah';
    end loop;For the FYI Notification, perhaps you should check the Notfication in the Workflow Builder, whether it has an Attribute with Respond type on the Notification.
    If you didn't put anything (only the message body) in the Notification, the message will suppose to be a FYI one.
    Regards,
    Buntoro

  • Connect by - sql help : getting error ORA-01489: result of string concatena

    here is an sql query and I am trying to cook a decode but since there are many columns invloved when I am trying to run this I am getting the following error:
    ORA-01489: result of string concatenation is too long
    Any kind of help is appreciated, I need to get this going otherwise I am dead :(
    Regards
    Rahul
    SQL:
    select sys_connect_by_path(c.decode_prep,'-') decode_prep
    from (select 'DECODE(BIAPPS_11.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||','||'RAHULKALRA.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||',''1'',''0'')' decode_prep, rownum curr, rownum -1 prev
    from (select rownum rn
    from dual connect by rownum <=
    (select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
    - length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
    from dual)) a, (select ','||'ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM'||',' all_cols from dual) b) c
    start with curr = 1
    connect by prior curr = prev
    order by length(sys_connect_by_path(c.decode_prep,'-')) desc
    same as above sql only difference is here I am pulling the first record from the result set which above query returns :
    select ltrim(replace(decode_prep,'-','||'),'||') decode_prep
    from (select sys_connect_by_path(c.decode_prep,'-') decode_prep
    from (select 'DECODE(BIAPPS_11.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||','||'RAHULKALRA.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||',''1'',''0'')' decode_prep, rownum curr, rownum -1 prev
    from (select rownum rn
    from dual connect by rownum <=
    (select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
    - length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
    from dual)) a, (select ','||'ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM'||',' all_cols from dual) b) c
    start with curr = 1
    connect by prior curr = prev
    order by length(sys_connect_by_path(c.decode_prep,'-')) desc)
    where rownum = 1
    Edited by: Mac_Freak_Rahul on Nov 28, 2012 1:31 AM : in the first sql ')'
    removed after desc in the last line so now this query will run and throw an error.

    Clearly your error is because the string concatenation you are doing with sys_connect_by_path is exceeding the 4000 bytes permitted by SQL.
    In that case you need to concatenate your data into a CLOB datatype, for which you'll need a CLOB aggregation function...
    create or replace type clobagg_type as object
      text clob,
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number,
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number,
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number,
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number
    create or replace type body clobagg_type is
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number is
      begin
        sctx := clobagg_type(null) ;
        return ODCIConst.Success ;
      end;
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number is
      begin
        self.text := self.text || value ;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number is
      begin
        returnValue := self.text;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number is
      begin
        self.text := self.text || ctx2.text;
        return ODCIConst.Success;
      end;
    end;
    create or replace function clobagg(input clob) return clob
      deterministic
      parallel_enable
      aggregate using clobagg_type;
    SQL> select trim(',' from clobagg(ename||',')) as enames from emp;
    ENAMES
    SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2    (select 'PFL' c1, 0 c2,110 c3 from dual union all
      3     select 'LHL', 0 ,111 from dual union all
      4     select 'PHL', 1, 111 from dual union all
      5     select 'CHL', 2, 111 from dual union all
      6     select 'DHL', 0, 112 from dual union all
      7     select 'VHL', 1, 112 from dual union all
      8     select 'CPHL', 0, 114 from dual union all
      9     select 'WDCL', 1, 114 from dual union all
    10     select 'AHL' ,2 ,114 from dual union all
    11     select 'NFDL', 3, 114 from dual)
    12  --
    13  -- end of test data
    14  --
    15  select trim(clobagg(c1||' ')) as c1, c3
    16  from (select * from t order by c3, c2)
    17  group by c3
    18* order by c3
    SQL> /
    C1                                     C3
    PFL                                   110
    LHL CHL PHL                           111
    DHL VHL                               112
    CPHL AHL NFDL WDCL                    114

  • How to concatinate two clob objects using JDBC...good brain excercise!!!

    Hi,
    I am using MYSQL server ver. 4.0 and J/Connector version 3.0.6
    I have two columns of LONGTEXT type and i have to concatenate them and store it in a third column.I have thought of the following strategy:
    1. Retrieve the columns as CLOB using getClob()
    2.Concatinate the CLOB values and then insert it in the corr. database column.
    My problem is this that i don't know what strategy should i use to concatenate the two values in the clob objects without bringing the whole clob values in the memeory.If i use this strategy..it gives me outofmemory error.
    My Clob columns may go upto 10MB in size.
    Pl. help.....Any suggestions from the whizkids out there will be extremely appreciated!!!
    Thanks....

    sorry for replying so late...but neway....
    Ok...i will paste a snapshot of my code here....May be that will clarify a few things....
    I am opening this in the main function body....To get the first column cell value....
    /////////////////Reading the Clob value of the main outer row which will be copmpared with the other rows under it//
    BufferedInputStream anInputStream = new BufferedInputStream( rs.getAsciiStream("row_interaction")); //row_intrctn
    int aByte = anInputStream.read();
    File aFile = File.createTempFile( "tempfile", "txt");
    FileOutputStream anOutput = new FileOutputStream(aFile);
    while (aByte != -1)
    anOutput.flush();
              anOutput.write(aByte);
    aByte = anInputStream.read();
    Then I depending on some condition i concatenate it with some other cell value from the database ...here i am just concatenating it with another rows column cell clob value..shown below as:
    if(loop==0)
    String col_string= null;
    col_string= convert_bitset_string(temp_b);
    //////Getting the other string value///////////////////////////////////////
    anInputStream = new BufferedInputStream( rs.getAsciiStream("row_interaction"));
    aByte = anInputStream.read();
    while (aByte != -1)
    anOutput.write(aByte);
    aByte = anInputStream.read();
    anOutput.flush();
    System.out.println("Loop0,2:The "+row_index+"st row being inserted");
    ////////////////////////Inserting through the prepared statement////////////
    String insertion= "Insert into bv"+next_tbl_nm_cntr+" Values(?,?,"+col_string+")";
    PreparedStatement pstmt= con.prepareStatement(insertion);
    pstmt.setInt(1,row_index);
    try{
    FileInputStream fis = new FileInputStream(aFile);
    pstmt.setAsciiStream(2,fis,(int)aFile.length());
    pstmt.execute();
    fis.close();
    }catch(IOException e)
    System.out.println("Error in setting the stream"+e);
    System.out.println("Loop0,2:Row inserted");
    row_index++;
    loop++;
    }     //End if: loop=0 i.e the row being inserted is the first row
                                  //in the store bitset
    Tell me if there is any error because when it concatenates i get some unwanted values too..which i took before in the iteration.....
    Any help will be greatly appreciated

  • Ora-01489: result of string concatenation is too long

    Hello Gurus,
    i have a typical problem
    i am constructing a query in FORM and writing SQLPLUS script into a .SQL file. file will contain final data like below..
    set linesize 90
    set pagesize 0
    set echo off
    set verify off
    set termout off
    set feedback off
    set trimspool on
    set escape '^'
    spool D:\10GAPPServerappln\xxx\TEMPREP\ADA39057.sql;
    set linesize 229
    select ' IQIS# ,Cust Complaint Short Txt ,CD Short Txt ' from dual;
    set linesize 129
    select a||','||b||','||c||d from table;
    spool off;
    exit;
    After this By using HOST command i will execute the above .sql script and will write the output to text file.
    But problem is when i have clob column in any one of concatenated columns in query (a or b or c) then i am getting the error "Ora-01489: result of string concatenation is too long".
    pls suggest me how to overcome this problem..

    sybrand_b wrote:
    Obviously the || operator is concatenating strings, your CLOB is implicitly converted to a VARCHAR2, which has a 4000 bytes limit.???
    From non-experts who did read documentation:
    CLOB || VARCHAR2 = CLOB:
    SQL> CREATE OR REPLACE
      2  VIEW V1
      3  AS SELECT TO_CLOB('A') || 'A' clob_concat_varchar2 FROM dual
      4  /
    View created.
    SQL> DESC V1
    Name                                      Null?    Type
    CLOB_CONCAT_VARCHAR2                               CLOB
    SQL> SY.

  • How to create a concatenated index with a long column (Urgent!!)

    We have a situation where we need to create a concatenated unique
    index with one of the columns as a "long" datatype. Oracle does
    not allow a lot of things with long columns.
    Does anyone know if this is possible or if there is a way to get
    around it.
    All help is appreciated!!!!

    From the Oracle SQL Reference ...
    "You cannot create an index on columns or attributes whose
    type is user-defined, LONG, LONG RAW, LOB, or REF,
    except that Oracle supports an index on REF type columns
    or attributes that have been defined with a SCOPE clause."
    Doesn't mention CLOB or BLOB types, so perhaps you
    should consider using one of those types instead. I have a
    feeling that the LONG type is now deprecated.

  • Working with clobs or extremelly large strings - please urgent

    Hi,
    i have a VARCHAR2 variable that is VARCHAR2(32767), is this possible?
    and i receive to the procedure a VARCHAR2 with almost 28000 character, then i have to insert that value as a CLOB in a xmltype table. This would look like a question to XML DB forum, but what i really need to know is how i can insert a string of that value in a table with a CLOB field. When i try i receive missing expression error. here goes the code:
    Procedure Insert_Data(xmlSTR in VARCHAR2)
    IS
         SQLStmt                                   VARCHAR2(32767);
    xmlDoc clob;
    BEGIN
    xmlDoc := 'xmltype(''<?xml version="1.0"?>' || xmlSTR || ''')';
    xml_table_name := 'XML_TABLE';
         EXECUTE IMMEDIATE 'create table XML_TABLE of xmltype';
    -- EXECUTE IMMEDIATE 'INSERT INTO ' || xml_table_name || ' VALUES (' || xmlDoc || ')'; --> with this expression i receive "PLS-00382: expression is of wrong type" error in compiling time.
    -- and with this i get "missing rigth parentesis" error in run time
         SQLStmt := ' INSERT INTO ' || xml_table_name || ' VALUES (' || xmlDoc || ')';
         EXECUTE IMMEDIATE SQLStmt;
    i'm working with oracle 9.2.07 in windows xp and also tried creating a table with a CLOB column and insert xmlDoc value for it, creating a loop and concatenating value from the string
    can someone help please

    You need to match your datatypes. Either insert an xmltype into a table of xmltype or insert a clob into a clob column. I have demonstated both below.
    scott@ORA92> CREATE OR REPLACE PROCEDURE insert_data
      2    (p_xmlSTR      IN VARCHAR2,
      3       p_xml_table_name IN VARCHAR2)
      4  AS
      5    v_xmlDoc          xmlTYPE;
      6  BEGIN
      7    EXECUTE IMMEDIATE
      8        'CREATE TABLE ' || p_xml_table_name || ' OF XMLTYPE';
      9    v_xmlDoc := XMLTYPE ('<?xml version="1.0"?>' || p_xmlSTR);
    10    EXECUTE IMMEDIATE
    11            'INSERT INTO ' || p_xml_table_name
    12        || ' VALUES (:b_xmlDoc)'
    13        USING v_xmlDoc;
    14  END insert_data;
    15  /
    Procedure created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> BEGIN
      2    insert_data
      3  ('<Warehouse>
      4        <WarehouseId>1</WarehouseId>
      5        <WarehouseName>Southlake, Texas</WarehouseName>
      6        <Building>Owned</Building>
      7        <Area>25000</Area>
      8        <Docks>2</Docks>
      9        <DockType>Rear load</DockType>
    10        <WaterAccess>true</WaterAccess>
    11        <RailAccess>N</RailAccess>
    12        <Parking>Street</Parking>
    13        <VClearance>10</VClearance>
    14    </Warehouse>',
    15   'xwarehouses');
    16  END;
    17  /
    PL/SQL procedure successfully completed.
    scott@ORA92> DESC xwarehouses
    Name                                                  Null?    Type
    TABLE of XMLTYPE
    scott@ORA92> SELECT * FROM xwarehouses
      2  /
    SYS_NC_ROWINFO$
    <Warehouse>
      <WarehouseId>1</WarehouseId>
      <WarehouseName>Southlake, Texas</WarehouseName>
      <Building>Owned</Building>
      <Area>25000</Area>
      <Docks>2</Docks>
      <DockType>Rear load</DockType>
      <WaterAccess>true</WaterAccess>
      <RailAccess>N</RailAccess>
      <Parking>Street</Parking>
      <VClearance>10</VClearance>
    </Warehouse>
    scott@ORA92> DROP TABLE xwarehouses
      2  /
    Table dropped.
    scott@ORA92> CREATE OR REPLACE PROCEDURE insert_data
      2    (p_xmlSTR      IN VARCHAR2,
      3       p_xml_table_name IN VARCHAR2)
      4  AS
      5    v_xmlDoc          CLOB;
      6  BEGIN
      7    EXECUTE IMMEDIATE
      8        'CREATE TABLE ' || p_xml_table_name || ' (clob_col CLOB)';
      9    v_xmlDoc := '<?xml version="1.0"?>' || p_xmlSTR;
    10    EXECUTE IMMEDIATE
    11            'INSERT INTO ' || p_xml_table_name
    12        || ' VALUES (:b_xmlDoc)'
    13        USING v_xmlDoc;
    14  END insert_data;
    15  /
    Procedure created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> BEGIN
      2    insert_data
      3  ('<Warehouse>
      4        <WarehouseId>1</WarehouseId>
      5        <WarehouseName>Southlake, Texas</WarehouseName>
      6        <Building>Owned</Building>
      7        <Area>25000</Area>
      8        <Docks>2</Docks>
      9        <DockType>Rear load</DockType>
    10        <WaterAccess>true</WaterAccess>
    11        <RailAccess>N</RailAccess>
    12        <Parking>Street</Parking>
    13        <VClearance>10</VClearance>
    14    </Warehouse>',
    15   'xwarehouses');
    16  END;
    17  /
    PL/SQL procedure successfully completed.
    scott@ORA92> DESC xwarehouses
    Name                                                  Null?    Type
    CLOB_COL                                                       CLOB
    scott@ORA92> SELECT * FROM xwarehouses
      2  /
    CLOB_COL
    <?xml version="1.0"?><Warehouse>
        <WarehouseId>1</WarehouseId>
        <WarehouseName>Southlake, Texas</WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
    scott@ORA92>

  • Scoring messed up using concatenated datastore Index

    Hi,
    Here is my table structure....
    CREATE TABLE SRCH_KEYWORD_SEARCH_SME
    SYS_ID NUMBER(10) NOT NULL,
    PAPER_NO VARCHAR2(10),
    PRODIDX_ID VARCHAR2(10),
    RESULT_TITLE VARCHAR2(255),
    RESULT_DESCR VARCHAR2(1000) NOT NULL,
    ABSTRACT CLOB,
    SRSLT_CATEGORY_ID VARCHAR2(10) NOT NULL,
    SRSLT_SUB_CATEGORY_ID VARCHAR2(10) NOT NULL,
    ACTIVE_FLAG VARCHAR2(1) DEFAULT 'Y' NOT NULL,
    EVENT_START_DATE DATE,
    EVENT_END_DATE DATE,
    Here is the Concatenated Datastore preference...
       -- Drop any existing storage preference.
       CTX_DDL.drop_preference('SEARCH_STORAGE_PREF');
       -- Create new storage preference.
       CTX_DDL.create_preference('SEARCH_STORAGE_PREF', 'BASIC_STORAGE');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'I_TABLE_CLAUSE', 'tablespace searchidx');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'K_TABLE_CLAUSE', 'tablespace searchidx');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'R_TABLE_CLAUSE', 'tablespace searchidx lob (data) store as (disable storage in row cache)');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'N_TABLE_CLAUSE', 'tablespace searchidx');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'I_INDEX_CLAUSE', 'tablespace searchidx  compress 2');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'P_TABLE_CLAUSE', 'tablespace searchidx');
       -- Drop any existing datastore preference.
       CTX_DDL.drop_preference('SEARCH_DATA_STORE');
       CTX_DDL.DROP_SECTION_GROUP('SEARCH_DATA_STORE_SG');
       -- Create new multi-column datastore preference.
       CTX_DDL.create_preference('SEARCH_DATA_STORE','MULTI_COLUMN_DATASTORE');
       CTX_DDL.set_attribute('SEARCH_DATA_STORE','columns','abstract, srslt_category_id, srslt_sub_category_id, active_flag');
       CTX_DDL.set_attribute('SEARCH_DATA_STORE', 'FILTER','N,N,N,N');
       -- Create new section group preference.
       CTX_DDL.create_section_group ('SEARCH_DATA_STORE_SG','BASIC_SECTION_GROUP');
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'abstract',              'abstract',             TRUE);
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'srslt_category_id',     'srslt_category_id',    TRUE);
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'srslt_sub_category_id', 'srslt_sub_category_id',TRUE);
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'active_flag',           'active_flag',          TRUE);
    Here is the context Index
    CREATE INDEX SRCH_KEYWORD_SEARCH_I ON SRCH_KEYWORD_SEARCH_SME(ABSTRACT)
       INDEXTYPE IS CTXSYS.CONTEXT
          PARAMETERS('STORAGE search_storage_pref DATASTORE SEARCH_DATA_STORE SECTION GROUP SEARCH_DATA_STORE_SG' )
    Here is the Query # 1 I am trying out...
    SELECT /*+ FIRST_ROWS(10) */
           SCORE(1) score_nbr,
           k.SYS_ID,
           k.RESULT_TITLE,
    FROM   SRCH_KEYWORD_SEARCH_SME k
    WHERE  CONTAINS (k.ABSTRACT, '<query><textquery><progression><seq>{hitchhiker} WITHIN abstract</seq></progression></textquery></query>',1) > 0
    ORDER BY SCORE(1) DESC;
    Here is the result for Query # 1...
    score_nbr   sys_id     result_title
    54          99220      SME Releases New Book The Hitchhiker's Guide to Lean                                                                                                                                                                                                     72                                    
    43          116583     Lean Leadership Package                                                                                                                                                                                                                                         72                                    
    32          132392     The Hitchhikers Guide to Lean: Lessons from the Road                                                                                                                                                                                                           72                                    
    11          132017     Lean Manufacturing A Plant Floor Guide Book Summary                                                                                                                                                                                                            72                                    
    11          137106     Managing Factory Maintenance, Second Edition                                                                                                                                                                                                                    72                                    
    11          132082     Lean Pocket GuideHere is the Query # 2 I am trying out...
    SELECT /*+ FIRST_ROWS(10) */
           SCORE(1) score_nbr,
           k.SYS_ID,
           k.RESULT_TITLE,
    FROM   SRCH_KEYWORD_SEARCH_SME k
    WHERE  CONTAINS (k.ABSTRACT, '<query><textquery><progression><seq>{hitchhiker} WITHIN abstract AND Y WITHIN active_flag</seq></progression></textquery></query>',1) > 0
    ORDER BY SCORE(1) DESC
    Here is the result for Query # 2...
    score_nbr sys_id     result_title
    3         132017     Lean Manufacturing: A Plant Floor Guide Book Summary                                                                                                                                                                                                            72                                    
    3         137106     Managing Factory Maintenance, Second Edition                                                                                                                                                                                                                    72                                    
    3         132082     Lean Pocket Guide                                                                                                                                                                                                                                               72                                    
    3         132083     The Toyota Way: 14 Management Principles From the World's Greatest...                                                                                                                                                                                           72                                    
    3         132417     Lean Manufacturing: A Plant Floor Guide                                                                                                                                                                                                                         72                                    
    3         132091     Breaking the Cost Barrier: A Proven Approach to Managing and...                                                                                                                                                                                                 72                                    
    3         99318      Conflicting pairs                                                                                                                                                                                                                                               72                                    
    3         132393     One-Piece Flow: Cell Design for Transforming the Production Process                                                                                                                                                                                             72                                    
    3         137091     Learning to See: Value Stream Mapping to Create Value & Eliminate MUDA                                                                                                                                                                                          72                                    
    3         137090     The Purchasing Machine: How the Top 10 Companies Use Best Practices...                                                                                                                                                                                          72                                    
    3         137393     Passion for Manufacturing My question is, why did the scoring went all the way to 3 for ALL the results the above query returned when I used the AND clause
    and added the 2nd column used in the datastore for my query condition..
    Also I want to use progressive relaxation technique in the queries to use stemming & fuzzy search option too.
    Help me out please....
    Thanks in advance.
    - Richard.

    Yes, it's in the doc - it's known as the weight operator.
    http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cqoper.htm#i998379
    "term*n      Returns documents that contain term. Calculates score by multiplying the raw score of term by n, where n is a number from 0.1 to 10."
    We're just using the operator twice as the limit on "n" is 10 (for no obvious reason I know of!). This is perfectly safe, and common practice.

  • How do I concatenate CLOB  datatypes ?

    I'm using Select  dbms_lob.substr(Table1.Column, 4000) from  Table1 to bring in the clob text ..
    But the maximum length of the CLOB text field in the column is 51465....
    so I'm trying to concatenate the column field from the same column...
    How can we i bring in the whole text from the column?

    How can we i bring in the whole text from the column?Why not simply
    Select  Table1.Column from  Table1?
    btw.:
    clobs can be concatenated with the || (concat) operator:
    SQL> select   length(lpad (to_clob ('x'), 50000, 'x')
                    || lpad (to_clob ('y'), 50000, 'y')) clob_length
      from   dual
    CLOB_LENGTH
         100000Edited by: michaels2 on May 14, 2009 8:00 AM

  • How to insert data into clob or xmltype column

    when i am inserting to clob or xml type column i am getting error like ERROR at line 2:
    ORA-01704: string literal too long
    INSERT INTO po_clob_tab
    values(100,'<TXLife>
         <UserAuthRequest>
              <UserLoginName>UserId</UserLoginName>
         </UserAuthRequest>
         <TXLifeRequest>
              <TransRefGUID>0099962A-BFF3-4761-4058-F683398D79F7</TransRefGUID>
              <TransType tc="186">OLI_TRANS_CHGPAR</TransType>
              <TransExeDate>2008-05-29</TransExeDate>
              <TransExeTime>12:01:01</TransExeTime>
              <InquiryLevel tc="3">OLI_INQUIRY_OBJRELOBJ</InquiryLevel>
              <InquiryView>
                   <InquiryViewCode>CU186A</InquiryViewCode>
              </InquiryView>
              <ChangeSubType>
                   <ChangeTC tc="32">Update / Add Client Object Information</ChangeTC>
                   <!--TranContentCode tc = 1 (Add)
                                                           tc = 2 (Update)
                                                           tc = 3 (Delete)
                   -->
                   <TranContentCode tc="1">Add</TranContentCode>
              </ChangeSubType>
              <OLifE>
                   <SourceInfo>
                        <SourceInfoName>Client Profile</SourceInfoName>
                   </SourceInfo>
                   <Activity id="Act1" PartyID="Party1">
                        <ActivityStatus tc="2">In Progress</ActivityStatus>
                        <UserCode>123456</UserCode>
                        <Opened>2010-08-17</Opened>
                        <ActivityCode>CP10001</ActivityCode>
                        <Attachment>
                             <Description>LastScreenName</Description>
                             <AttachmentData>CP Create</AttachmentData>
                             <AttachmentType tc="2">OLI_ATTACH_COMMENT </AttachmentType>
                             <AttachmentLocation tc="1">OLI_INLINE </AttachmentLocation>
                        </Attachment>
                        <OLifEExtension VendorCode="05" ExtensionCode="Activity">
                             <ActivityExtension>
                                  <SubActivityCode>CP20001</SubActivityCode>
                             </ActivityExtension>
                        </OLifEExtension>
                   </Activity>
                   <Grouping id="Grouping1">
                        <Household>
                             <EstIncome>90000</EstIncome>
                        </Household>
                   </Grouping>
                   <Holding id="Holding1">
                        <HoldingTypeCode tc="2">Policy</HoldingTypeCode>
                        <Purpose tc="35">Accumulation</Purpose>
                        <Policy>
                             <ProductType tc="1009800001">AXA Network Non-Proprietary Variable Life Product</ProductType>
                             <ProductCode>Plus9</ProductCode>
                             <PlanName>Accumulator Plus 9.0</PlanName>
                             <Annuity>
                                  <QualPlanType tc="45">Qualified</QualPlanType>
                             </Annuity>
                             <ApplicationInfo>
                                  <ApplicationJurisdiction tc="35">New Jersey</ApplicationJurisdiction>
                                  <OLifEExtension VendorCode="05" ExtensionCode="ApplicationInfo">
                                       <ApplicationInfoExtension>
                                            <FinancialPlanIInd tc="0">False</FinancialPlanIInd>
                                            <AgentVerifiesOwnersID tc="1">True</AgentVerifiesOwnersID>
                                       </ApplicationInfoExtension>
                                  </OLifEExtension>
                             </ApplicationInfo>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>10</FinActivityPct>
                                  <Payment>
                                       <SourceOfFundsTC tc="18">Gift</SourceOfFundsTC>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="1009800001">Cash</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>10</FinActivityPct>
                                  <Payment>
                                       <SourceOfFundsTC tc="8">Personal Loan</SourceOfFundsTC>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="1009800002">Borrowing</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>10</FinActivityPct>
                                  <Payment>
                                       <SourceOfFundsTC tc="10">Withdrawal</SourceOfFundsTC>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="1009800003">Policy Related</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>10</FinActivityPct>
                                  <Payment>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="1009800005">Sale of 401(k) Mutual Fund Shares, Existing Pension Plan Assets, Stocks, Bonds, CD’s</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>10</FinActivityPct>
                                  <Payment>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="1009800004">Sale of qualified or non-qualified Mutual Fund Shares</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>20</FinActivityPct>
                                  <Payment>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="1009800006">Sale of Investment Advisory Assets</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                             <FinancialActivity>
                                  <FinActivityType tc="7">Initial Payment</FinActivityType>
                                  <FinActivityPct>20</FinActivityPct>
                                  <Payment>
                                       <SourceOfFundsTC tc="1009800008">Car</SourceOfFundsTC>
                                       <OLifEExtension VendorCode="05" ExtensionCode="Payment">
                                            <PaymentExtension>
                                                 <FundingDisclosureDetails>
                                                      <FundingDisclosureTC tc="2147483647">Other</FundingDisclosureTC>
                                                 </FundingDisclosureDetails>
                                            </PaymentExtension>
                                       </OLifEExtension>
                                  </Payment>
                             </FinancialActivity>
                        </Policy>
                   </Holding>
                   <Party id="Party1">
                        <PartyTypeCode tc="1">Person</PartyTypeCode>
                        <EstNetWorth>250000</EstNetWorth>
                        <LiquidNetWorthAmt>120000</LiquidNetWorthAmt>
                        <EstTotAssetsAmt>400000</EstTotAssetsAmt>
                        <Person>
                             <FirstName>John</FirstName>
                             <LastName>Doe</LastName>
                             <MarStat tc="1">Married</MarStat>
                             <Gender tc="1">Male</Gender>
                             <BirthDate>1965-05-07</BirthDate>
                             <EducationType tc="3">Associate Degree</EducationType>
                             <Citizenship tc="1">USA</Citizenship>
                             <NetIncomeAmt>70000</NetIncomeAmt>
                             <DriversLicenseNum>D123456789</DriversLicenseNum>
                             <DriversLicenseState tc="35">New Jersey</DriversLicenseState>
                             <ImmigrationStatus tc="8">Citizen</ImmigrationStatus>
                             <DriversLicenseExpDate>2012-05-25</DriversLicenseExpDate>
                             <OLifEExtension VendorCode="05" ExtensionCode="Person">
                                  <PersonExtension>
                                       <NoDriversLicenseInd tc="0">False</NoDriversLicenseInd>
                                  </PersonExtension>
                             </OLifEExtension>
                        </Person>
                        <Address>
                             <Line1>125 Finn Lane</Line1>
                             <City>North Brunswick</City>
                             <AddressStateTC tc="35">New Jersey</AddressStateTC>
                             <Zip>08902</Zip>
                        </Address>
                        <Phone>
                             <PhoneTypeCode tc="1">Home</PhoneTypeCode>
                             <DialNumber>732456789</DialNumber>
                        </Phone>
                        <Phone>
                             <PhoneTypeCode tc="2">Work</PhoneTypeCode>
                             <DialNumber>732987654</DialNumber>
                        </Phone>
                        <Attachment>
                             <Description>Comments</Description>
                             <AttachmentData>This is the comments entered for the client</AttachmentData>
                             <AttachmentType tc="2">OLI_ATTACH_COMMENT </AttachmentType>
                             <AttachmentLocation tc="1">OLI_INLINE </AttachmentLocation>
                        </Attachment>
                        <Attachment>
                             <AttachmentSysKey>1</AttachmentSysKey>
                             <Description>Additional Notes Important Considerations</Description>
                             <AttachmentData>This is the comments entered for the client</AttachmentData>
                             <AttachmentType tc="2">OLI_ATTACH_COMMENT </AttachmentType>
                             <AttachmentLocation tc="1">OLI_INLINE </AttachmentLocation>
                        </Attachment>
                        <Attachment>
                             <AttachmentSysKey>2</AttachmentSysKey>
                             <Description>Additional Notes Important Considerations</Description>
                             <AttachmentData>This is the comments entered for the client</AttachmentData>
                             <AttachmentType tc="2">OLI_ATTACH_COMMENT </AttachmentType>
                             <AttachmentLocation tc="1">OLI_INLINE </AttachmentLocation>
                        </Attachment>
                        <Client>
                             <NumRelations>1</NumRelations>
                             <EstTaxBracket>10</EstTaxBracket>
                             <BrokerDealerInd tc="1">True</BrokerDealerInd>
                             <EstIncomeAmt>90000</EstIncomeAmt>
                             <PrimaryInvObjective tc="8">Income and Growth</PrimaryInvObjective>
                             <InvHorizonRangeMin>5</InvHorizonRangeMin>
                             <OLifEExtension VendorCode="05" ExtensionCode="Client">
                                  <ClientExtension>
                                       <RiskToleranceCode tc="3">Moderate</RiskToleranceCode>
                                       <FINRAAffiliationName>John Doe</FINRAAffiliationName>
                                       <Rank>
                                            <RankCategory tc="1009800001">Financial Goal</RankCategory>
                                            <TotalRankCode>5</TotalRankCode>
                                            <RankCode PurposeID="1009800016">6</RankCode>
                                            <RankCode PurposeID="35">6</RankCode>
                                            <RankCode PurposeID="2">6</RankCode>
                                            <RankCode PurposeID="1009800013">6</RankCode>
                                            <RankCode PurposeID="1009800014">6</RankCode>
                                            <RankCode PurposeID="5">6</RankCode>
                                            <RankCode PurposeID="1009800015">6</RankCode>
                                       </Rank>
                                  </ClientExtension>
                             </OLifEExtension>
                        </Client>
                        <EMailAddress>
                             <EMailType tc="1">Business</EMailType>
                             <AddrLine>[email protected]</AddrLine>
                        </EMailAddress>
                        <Risk>
                             <HHFamilyInsurance>
                                  <HHFamilyInsuranceSysKey>1</HHFamilyInsuranceSysKey>
                                  <DeclinedInd tc="0">False</DeclinedInd>
                                  <LineOfBusiness tc="1">Life Insurance</LineOfBusiness>
                             </HHFamilyInsurance>
                             <HHFamilyInsurance>
                                  <HHFamilyInsuranceSysKey>2</HHFamilyInsuranceSysKey>
                                  <DeclinedInd tc="0">False</DeclinedInd>
                                  <LineOfBusiness tc="1">Life Insurance</LineOfBusiness>
                             </HHFamilyInsurance>
                             <HHFamilyInsurance>
                                  <HHFamilyInsuranceSysKey>1</HHFamilyInsuranceSysKey>
                                  <DeclinedInd tc="0">False</DeclinedInd>
                                  <LineOfBusiness tc="3">Disability Insurance</LineOfBusiness>
                             </HHFamilyInsurance>
                             <HHFamilyInsurance>
                                  <HHFamilyInsuranceSysKey>1</HHFamilyInsuranceSysKey>
                                  <DeclinedInd tc="0">False</DeclinedInd>
                                  <LineOfBusiness tc="5">LTC Insurance</LineOfBusiness>
                             </HHFamilyInsurance>
                             <FinancialExperience>
                                  <InvestmentType tc="7">CD</InvestmentType>
                                  <YearsOfInvestmentExperience>1</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>30000</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                             <FinancialExperience>
                                  <InvestmentType tc="3">Stock</InvestmentType>
                                  <YearsOfInvestmentExperience>1</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>5000</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                             <FinancialExperience>
                                  <InvestmentType tc="2">Bond</InvestmentType>
                                  <YearsOfInvestmentExperience>6</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>50000</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                             <FinancialExperience>
                                  <InvestmentType tc="15">Variable Annuities</InvestmentType>
                                  <YearsOfInvestmentExperience>4</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>50000</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                             <FinancialExperience>
                                  <InvestmentType tc="6">Mutual Funds</InvestmentType>
                                  <YearsOfInvestmentExperience>0</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>0</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                             <FinancialExperience>
                                  <InvestmentType tc="1009800001">Cash</InvestmentType>
                                  <YearsOfInvestmentExperience>20</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>100000</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                             <FinancialExperience>
                                  <InvestmentType tc="2147483647">Other</InvestmentType>
                                  <YearsOfInvestmentExperience>0</YearsOfInvestmentExperience>
                                  <OLifEExtension VendorCode="05" ExtensionCode="FinancialExperience">
                                       <FinancialExperienceExtension>
                                            <AssetValue>0</AssetValue>
                                       </FinancialExperienceExtension>
                                  </OLifEExtension>
                             </FinancialExperience>
                        </Risk>
                        <Employment EmployerPartyID="Party4">
                             <OccupClass tc="1009800001">Employed</OccupClass>
                             <Occupation>Solution Architect</Occupation>
                             <EmployerName>AXA</EmployerName>
                             <YearsAtEmployment>15</YearsAtEmployment>
                        </Employment>
                        <GovtIDInfo>
                             <GovtID>123456789</GovtID>
                             <GovtIDTC tc="17">Passport</GovtIDTC>
                             <GovtIDExpDate>2015-08-24</GovtIDExpDate>
                             <Nation tc="1">USA</Nation>
                             <Jurisdiction tc="35">New Jersey</Jurisdiction>
                        </GovtIDInfo>
                   </Party>
                   <Party id="Party2">
                        <PartyTypeCode tc="1">Person</PartyTypeCode>
                        <PartySysKey>ProfileID456</PartySysKey>
                        <Person>
                             <FirstName>Jacqueline</FirstName>
                             <LastName>Doe</LastName>
                             <MarStat tc="1">Married</MarStat>
                             <Gender tc="2">Female</Gender>
                             <BirthDate>1975-05-07</BirthDate>
                             <EducationType tc="3">Associate Degree</EducationType>
                             <Citizenship tc="1">USA</Citizenship>
                             <DriversLicenseNum>D987654321</DriversLicenseNum>
                             <DriversLicenseState tc="35">New Jersey</DriversLicenseState>
                             <ImmigrationStatus tc="8">Citizen</ImmigrationStatus>
                             <DriversLicenseExpDate>2012-05-25</DriversLicenseExpDate>
                             <OLifEExtension VendorCode="05" ExtensionCode="Person">
                                  <PersonExtension>
                                       <NoDriversLicenseInd tc="0">False</NoDriversLicenseInd>
                                  </PersonExtension>
                             </OLifEExtension>
                        </Person>
                        <Address>
                             <Line1>125 Finn Lane</Line1>
                             <City>North Brunswick</City>
                             <AddressStateTC tc="35">New Jersey</AddressStateTC>
                             <Zip>08902</Zip>
                        </Address>
                        <Phone>
                             <PhoneTypeCode tc="1">Home</PhoneTypeCode>
                             <DialNumber>732456789</DialNumber>
                        </Phone>
                        <Risk>
                             <HHFamilyInsurance>
                                  <HHFamilyInsuranceSysKey>1</HHFamilyInsuranceSysKey>
                                  <DeclinedInd tc="0">False</DeclinedInd>
                                  <LineOfBusiness tc="1">Life Insurance</LineOfBusiness>
                             </HHFamilyInsurance>
                        </Risk>
                        <Employment>
                             <OccupClass tc="4">Unemployed</OccupClass>
                        </Employment>
                        <GovtIDInfo>
                             <GovtID>987654321</GovtID>
                             <GovtIDTC tc="17">Passport</GovtIDTC>
                             <GovtIDExpDate>2015-08-24</GovtIDExpDate>
                             <Nation tc="1">USA</Nation>
                             <Jurisdiction tc="35">New Jersey</Jurisdiction>
                        </GovtIDInfo>
                   </Party>
                   <Party id="Party3">
                        <PartyTypeCode tc="1">Person</PartyTypeCode>
                        <Person>
                             <FirstName>Joe</FirstName>
                             <LastName>Doe</LastName>
                             <Age>15</Age>
                        </Person>
                   </Party>
                   <Party id="Party4">
                        <Person/>
                        <Address>
                             <Line1>425 Washington Blvd.</Line1>
                             <City>Jersey City</City>
                             <AddressStateTC tc="35">New Jersey</AddressStateTC>
                             <Zip>07302</Zip>
                        </Address>
                   </Party>
                   <Relation OriginatingObjectID="Grouping1" id="Relation1" RelatedObjectID="Party1">
                        <OriginatingObjectType tc="16">Grouping</OriginatingObjectType>
                        <RelatedObjectType tc="6">Party</RelatedObjectType>
                        <RelationRoleCode tc="30">Member</RelationRoleCode>
                   </Relation>
                   <Relation OriginatingObjectID="Grouping1" id="Relation2" RelatedObjectID="Party2">
                        <OriginatingObjectType tc="16">Grouping</OriginatingObjectType>
                        <RelatedObjectType tc="6">Party</RelatedObjectType>
                        <RelationRoleCode tc="30">Member</RelationRoleCode>
                   </Relation>
                   <Relation OriginatingObjectID="Party1" id="Relation3" RelatedObjectID="Party3">
                        <OriginatingObjectType tc="6">Party</OriginatingObjectType>
                        <RelatedObjectType tc="6">Party</RelatedObjectType>
                        <RelationRoleCode tc="40">Dependant</RelationRoleCode>
                   </Relation>
                   <Relation OriginatingObjectID="Holding1" id="Relation4" RelatedObjectID="Party1">
                        <OriginatingObjectType tc="4">Holding</OriginatingObjectType>
                        <RelatedObjectType tc="6">Party</RelatedObjectType>
                        <RelationRoleCode tc="8">Owner</RelationRoleCode>
                   </Relation>
                   <Relation OriginatingObjectID="Holding1" id="Relation5" RelatedObjectID="Party2">
                        <OriginatingObjectType tc="4">Holding</OriginatingObjectType>
                        <RelatedObjectType tc="6">Party</RelatedObjectType>
                        <RelationRoleCode tc="184">Joint Owner</RelationRoleCode>
                   </Relation>
                   <Relation OriginatingObjectID="Form1" id="Relation6" RelatedObjectID="Party1">
                        <OriginatingObjectType tc="101">FormInstance</OriginatingObjectType>
                        <RelatedObjectType tc="6">Party</RelatedObjectType>
                        <RelationRoleCode tc="107">Form For</RelationRoleCode>
                   </Relation>
                   <FormInstance id="Form1">
                        <FormResponse>
                             <ResponseText>No</ResponseText>
                             <QuestionType tc="1009800001">Is the Client/Owner with an interest in the account either: (A) a senior military, governmental, or political official in a non-U.S. country, or (B) closely associated with or an immediate family member of such official?</QuestionType>
                        </FormResponse>
                        <FormResponse>
                             <ResponseText>Yes</ResponseText>
                             <QuestionType tc="1009800005">I am familiar with the product(s) being sold and have determined proper suitability. For deferred variable annuity purchases only: I have reasonable grounds for believing that the recommendations for this customer to purchase/exchange an annuity is suitable on the basis of the facts disclosed by the customer as to his/her investments, insurance products and financial situation and needs.</QuestionType>
                        </FormResponse>
                   </FormInstance>
              </OLifE>
         </TXLifeRequest>
    </TXLife>');
    /

    It's a really bad idea to assemble XML using strings and string concatenation in SQL or PL/SQL. First there is a 4K limit in SQL, and 32K limit in PL/SQL, which means you end up constructing the XML in chunks, adding uneccessary complications. 2nd you cannot confirm the XML is valid or well formed using external tools.
    IMHO it makes much more sense to keep the XML content seperated from the SQL / PL/SQL code
    When the XML can be stored a File System accessable from the database, The files can be loaded into the database using mechansims like BFILE.
    In cases where the XML must be staged on a remote file system, the files can be loaded into the database using FTP or HTTP and in cases where this is not an option, SQLLDR.
    -Mark

Maybe you are looking for

  • IPod (5th Gen) and Windows Vista 64 bit

    I have heard that X64 Vista will crash if I add my iPod to the system. True? Thanks!

  • Apple Mobile Device Services won't start

    When I attempt to install the latest version of itunes on my Windows XP machine it consistently fails. It starts by not being able to start the Apple Mobile Device Service. When I ignore, it finished but when I try to start iTunes, I receive the mess

  • HT1338 How do I create a group in my contacts

    There is no place in my contacts nor in my email to create a group.

  • Anybody using MailTags?

    So it would seem that MailTags is the best way for me to do what I want. That is I maintain a whitelist of people who can send me email and typically my server tags the email (by adding a header as the message was delivered) as to whether the sender

  • Alternative to DCL with Maps

    Hi, "Double-Check Locking" with HashMap is broken, but it has (not working) features we may need to reproduce: 1. Efficient get if a value is already present in the map. 2. Single value creation (if value is absent). The public V putIfAbsent(K key, V