Generating multi-level XML in Oracle 8i using XML-SQL utility

Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
Thank you.
Michael

Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
Thank you.
Michael

Similar Messages

  • Generating multi-level xml in oracle

    Hi,
    I want to create a multi-level XML structure from oracle, is there a way?
    Presently oracle provides DBMS_XMLQUERY and XMLGEN package to generated XML structure given a query. But the structure so generated is of single level. That is say I use
    select XMLGEN.getXML('select * from employees') from dual;
    the output is
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <TEL>451-638191</TEL>
    </ROW>
    </EMPLOYEE>
    That I call a single level output.
    To create a multiple level XML I went in for object type in oracle. But the problem with this is that if I want to have multiple children for a single parent then object types fail. The structure below is not possible with object type.
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <CONTACT>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fifth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>451-638191</ROW>
         <ROW>451-638192</ROW>
         <ROW>451-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fouth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>452-638191</ROW>
         <ROW>452-638192</ROW>
         <ROW>452-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    </CONTACT>
    </ROW>
    </EMPLOYEE>
    Then I tried nested tables. Here one needs to create an object type to create a table type. One cannot create a table type out of another table type. So that leavs me with 2 levels
    object type
    used by
    table type
    used by
    table.
    Presently to generated a multi-level output as shown above I'm using cursors and build it in a clob variable.
    Is there any other way that one can build a multi-level structure. Or is there a build in package that comes with orace 8i (and higher).
    Regards,
    Milton.

    Milton,
    I was able to generate hierarchical XML from Oracle using object views and XML-SQL Utility (XSU).
    Here is a simplified version of my OR schema:
    /* Physical spec object */
    create or replace type physical_specifications_object as object (
    physical_specifications_id number(15),
    page_count number(10),
    product_id number(10),
    four_color_count number(10),
    two_color_count number(10),
    table_count number(10),
    binding_type varchar2(100),
    height varchar2(20),
    width varchar2(20)
    /* Market object */
    create or replace type market_object as object (
    market_id number(15),
    master_class_name varchar2(50),
    market_name varchar2(100),
    market_type varchar2(100),
    market_description varchar2(500),
    level_rank varchar2(15),
    market_code varchar2(100),
    product_id number(10)
    /* List of markets */
    create or replace type market_table as table of market_object;
    /* Market object view */
    create or replace view market_object_view of market_object
    with object identifier (market_id) as
    select mkt.market_id,
    class.master_class_name,
    mkt.market_name,
    mkt.market_type,
    mkt.market_description,
    prod_mkt.level_rank,
    mkt.market_code,
    p.product_id
    from market mkt,
    product p,
    product_market prod_mkt,
    master_class class
    where p.product_id = prod_mkt.product_id
    and prod_mkt.market_id = mkt.market_id
    and mkt.master_class_id = class.master_class_id(+);
    /* Feature object */
    create or replace type product_feature_object as object (
    feature_id number(15),
    feature_text varchar2(3500),
    feature_type varchar2(100)
    /* List of features */
    create or replace type product_feature_table as table of product_feature_object;
    /* Product object */
    create or replace type product_object as object (
    product_id number(10),
    title varchar2(150),
    media_type varchar2(20),
    standard_number varchar2(100),
    physical_specifications physical_specifications_object,
    markets market_table,
    product_features product_feature_table
    /* Product object view */
    create or replace view product_object_view of product_object
    with object identifier (product_id) as
    select p.product_id,
    p.title,
    p.media_type,
    p.standard_number,
    physical_specifications_object(spec.physical_specifications_id,
    spec.page_count,
    spec.product_id,
    spec.four_color_count,
    spec.two_color_count,
    spec.table_count,
    spec.binding_type,
    spec.height,
    spec.width),
    cast(multiset(select *
    from market_object_view mkt
    where mkt.product_id(+) = p.product_id) as market_table) as markets,
    cast(multiset(select f.feature_id, f.feature_text, f.feature_type
    from feature f
    where f.product_id = p.product_id) as product_feature_table) as product_features
    from product p,
    physical_specifications spec
    where p.product_id = spec.product_id(+)
    The objective is to generate XML for a product list with all the product subelements. The simple query "select * from product_object_view" when fed to the XML-SQL utility generates multi-level SQL. Note that Oracle 8i allows up to two level collection nesting in object types. Oracle 9i removes this limitation.
    Check XSU documentation at http://otn.oracle.com/docs/tech/xml/xdk_java/doc_library/Production9i/doc/java/xsu/xsu_userguide.html#1014886
    Hi,
    I want to create a multi-level XML structure from oracle, is there a way?
    Presently oracle provides DBMS_XMLQUERY and XMLGEN package to generated XML structure given a query. But the structure so generated is of single level. That is say I use
    select XMLGEN.getXML('select * from employees') from dual;
    the output is
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <TEL>451-638191</TEL>
    </ROW>
    </EMPLOYEE>
    That I call a single level output.
    To create a multiple level XML I went in for object type in oracle. But the problem with this is that if I want to have multiple children for a single parent then object types fail. The structure below is not possible with object type.
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <CONTACT>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fifth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>451-638191</ROW>
         <ROW>451-638192</ROW>
         <ROW>451-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fouth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>452-638191</ROW>
         <ROW>452-638192</ROW>
         <ROW>452-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    </CONTACT>
    </ROW>
    </EMPLOYEE>
    Then I tried nested tables. Here one needs to create an object type to create a table type. One cannot create a table type out of another table type. So that leavs me with 2 levels
    object type
    used by
    table type
    used by
    table.
    Presently to generated a multi-level output as shown above I'm using cursors and build it in a clob variable.
    Is there any other way that one can build a multi-level structure. Or is there a build in package that comes with orace 8i (and higher).
    Regards,
    Milton.

  • Import multi-level BOM into Oracle

    We have a client requirement to create BOM based on level using Pl/Sql, Data will be coming in the below format:-
    Item Description      BOM LEVEL
    a               *1*     
    aa               *2*     
    aaa               *3*     
    aab               *3*     
    aaba               *4*     
    aabb               *4*     
    ab               *2*     
    aba               *3*     
    abb               *3*     
    we want the above data in table to be inserted in below format:
    Assembly Item     Component Item
    a               Aa
    Aa               Aaa
    Aa               Aab
    Aa               Aac
    A               Ab
    Ab               Aba
    Ab               Abb
    Aab               aaba
    Please suggest.
    Thanks,
    Urvashi Arora
    Edited by: user10992307 on 08-May-2012 23:07

    When you look at one row in your source data, there is no way to tell what is the parent item for the component you are looking at.
    So you will have to write a program that walks thru the data and builds parent=child relationship. It will be a tricky program but once that is done, all you have to do is to insert into bom interface tables and Oracle will take care of the rest.
    Oracle BOM interface will take care of building a multi-level structure.
    Sandeep Gandhi

  • Building XPath with the XML having the Namespace using PL SQL

    While trying to build the path of each node, when the XML has no namespace in it , the below code works fine providing the result
    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat/
    7~/person/homecity/name/
    8~/person/homecity/long/
    But when the xml is changed to
    <person xmlns="urn:person" xmlns:lat="urn:lat">
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>"
    The result on executing the below code is resulting into only into below result
    1~/
    2~/person/
    In the XML provided above, XML name space is not constant and it may vary for every XML. My requirement is to parse the complete XML, where i can read the XML with namespace and get the result as mentioned below
    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat:lat/
    7~/person/homecity/name/
    8~/person/homecity/long/
    Can you please help me resolving the issue mentioned. Thanks in advance. --Code Snippet below :
    DECLARE
      l_File VARCHAR2(32000) := '<person>
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>';
    l_Where_Clause VARCHAR2(100) := '/*';
    l_Append_Var   VARCHAR2(100) := '/';
    TYPE Ty_Paths IS TABLE OF VARCHAR2(1000) INDEX BY PLS_INTEGER;
    l_Ty_Paths      Ty_Paths;
    l_Ty_Paths_Temp Ty_Paths;
    TYPE Ty_Verifier IS TABLE OF VARCHAR2(1000) INDEX BY VARCHAR2(1000);
    l_Ty_Varifier Ty_Verifier;
    l_Prev_Query_Rec VARCHAR2(100);
    l_Index_Num      NUMBER := 0;
    l_Cur_Exec_Row   NUMBER := 0;
    BEGIN
    l_Ty_Paths(Nvl(l_Ty_Paths.COUNT, 0) + 1) := l_Append_Var;
    l_Cur_Exec_Row := 1;
    --Dbms_Output.put_line('Before entering the loop');
    LOOP
       l_Ty_Paths_Temp.DELETE;
      SELECT DISTINCT REPLACE(l_Append_Var || '/' || t.Xml || '/', '//', '/') BULK COLLECT
       INTO   l_Ty_Paths_Temp
      FROM   (SELECT Xmltype(Extract(VALUE(e), '/').Getstringval()) .Getrootelement() AS Xml
               FROM   TABLE(Xmlsequence(Extract(Xmltype(l_File), l_Where_Clause))) e) t;
      l_Ty_Varifier(Nvl(l_Ty_Varifier.COUNT, 0) + 1) := l_Append_Var;
      --Dbms_Output.put_line('L_TY_PATHS_TEMP.Count::'||L_TY_PATHS_TEMP.Count);
      IF l_Ty_Paths_Temp.COUNT > 0 THEN
         l_Index_Num := Nvl(l_Ty_Paths.COUNT, 0) + 1;
         FOR i IN l_Ty_Paths_Temp.FIRST .. l_Ty_Paths_Temp.LAST LOOP
            l_Ty_Paths(l_Index_Num) := l_Ty_Paths_Temp(i);
            --Dbms_Output.put_line('L_INDEX_NUM::'||L_INDEX_NUM);
            --Dbms_Output.put_line('L_TY_PATHS(L_INDEX_NUM)::'||L_TY_PATHS(L_INDEX_NUM));
            l_Index_Num := l_Index_Num + 1;
         END LOOP;
      END IF;
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_TY_PATHS.Count);
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_CUR_EXEC_ROW);
      IF (NOT l_Ty_Paths.EXISTS(l_Cur_Exec_Row + 1)) OR (l_Cur_Exec_Row = l_Ty_Paths.COUNT) THEN
         --Dbms_Output.put_line('Exiting');
         EXIT;
      ELSE
         --Dbms_Output.put_line('Inside the Else part');
         l_Cur_Exec_Row := l_Cur_Exec_Row + 1;
         l_Append_Var   := l_Ty_Paths(l_Cur_Exec_Row);
         l_Where_Clause := l_Ty_Paths(l_Cur_Exec_Row) || '*';
      END IF;
      --To Display the record:
         --Dbms_Output.put_line(L_TY_PATHS.Count);
      END LOOP;
      IF l_Ty_Paths.COUNT > 0 THEN
        FOR i IN l_Ty_Paths.FIRST .. l_Ty_Paths.LAST LOOP
          Dbms_Output.Put_Line(i || ' record is ' || l_Ty_Paths(i));
       END LOOP;
    END IF;
    END;

    Hi,
    Thanks for the reply.
    Please find the details :
    1) What's your database version ?
    Database version  :
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    2) What's the practical use of extracting all the paths like this, what are you trying to achieve, besides a purely academic exercise ?
    The XML provided was for sample XML.
    The practical use being ,I wanted to parse the SEPA messages using the below code snippet dynamically.
    create table data_table (
         data xmltype
        xmltype column data store as securefile binary xml
    insert into data_table values (
        xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <SCTScfBlkCredTrf xmlns="urn:S2SCTScf:xsd:$SCTScfBlkCredTrf">
      <SndgInst>CMCIFRPPXXX</SndgInst>
      <RcvgInst>RLBBAT2E083</RcvgInst>
      <FileRef>006FRID2516PH712</FileRef>
      <SrvcId>SCT</SrvcId>
      <TstCode>T</TstCode>
      <FType>SCF</FType>
      <FDtTm>2012-11-01T01:12:22</FDtTm>
      <NumCTBlk>1</NumCTBlk>
      <NumPCRBlk>0</NumPCRBlk>
      <NumRFRBlk>0</NumRFRBlk>
      <NumROIBlk>0</NumROIBlk>
    <FIToFICstmrCdtTrf xmlns="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">
      <GrpHdr>
        <MsgId>006MSID12511PH712</MsgId>
        <CreDtTm>2012-11-01T08:09:14</CreDtTm>
        <NbOfTxs>1</NbOfTxs>
        <TtlIntrBkSttlmAmt Ccy="EUR">20000</TtlIntrBkSttlmAmt>
        <IntrBkSttlmDt>2012-11-01</IntrBkSttlmDt>
        <SttlmInf>
          <SttlmMtd>INGA</SttlmMtd>
          <ClrSys>
            <Prtry></Prtry>
          </ClrSys>
        </SttlmInf>
        <InstgAgt>
          <FinInstnId>
            <BIC>RLBBAT2E083</BIC>
          </FinInstnId>
        </InstgAgt>
        <InstdAgt>
          <FinInstnId>
            <BIC>HELADEF1XXX</BIC>
          </FinInstnId>
        </InstdAgt>
      </GrpHdr>
      <CdtTrfTxInf>
        <PmtId>
          <EndToEndId>006SEOP23END1712</EndToEndId>
          <TxId>006SEOP231PH1712</TxId>
        </PmtId>
        <PmtTpInf>
          <SvcLvl>
            <Cd>SEPA</Cd>
          </SvcLvl>
        </PmtTpInf>
        <IntrBkSttlmAmt Ccy="EUR">20000</IntrBkSttlmAmt>
        <AccptncDtTm>2012-11-01T12:00:00</AccptncDtTm>
        <ChrgBr>SLEV</ChrgBr>
        <Dbtr>
          <Nm>Mrinmoy Sahu</Nm>
          <PstlAdr>
            <Ctry>FR</Ctry>     
            <AdrLine>6</AdrLine>
            <AdrLine>Bangalore</AdrLine>
          </PstlAdr>
          <Id>
            <PrvtId>
              <Othr>
                <Id>E20809</Id>
                <SchmeNm></SchmeNm>
                <Issr>ORACLE CORP</Issr>
              </Othr>
            </PrvtId>
          </Id>
        </Dbtr>
        <DbtrAcct>
          <Id>
            <IBAN>FR7030087330086000000000591</IBAN>
          </Id>
        </DbtrAcct>
        <DbtrAgt>
          <FinInstnId>
            <BIC>CMCIFRPPXXX</BIC>
          </FinInstnId>
        </DbtrAgt>
        <CdtrAgt>
          <FinInstnId>
            <BIC>RLBBAT2E083</BIC>
          </FinInstnId>
        </CdtrAgt>
        <Cdtr>
          <Nm>Mrinmoy Sahu</Nm>
          <PstlAdr>
            <Ctry>FR</Ctry>     
            <AdrLine>22 </AdrLine>
          </PstlAdr>
          <Id>
            <PrvtId>
              <Othr>
                <Id>F676869</Id>
                <SchmeNm></SchmeNm>
                <Issr>GOVT OF INDIA</Issr>
              </Othr>
            </PrvtId>
          </Id>
        </Cdtr>
        <CdtrAcct>
          <Id>
            <IBAN>FR7630087330086000000004266</IBAN>
          </Id>
        </CdtrAcct>
        <RmtInf>
            <Ustrd>abc</Ustrd>
          </RmtInf>
      </CdtTrfTxInf>   
      </FIToFICstmrCdtTrf>
    </SCTScfBlkCredTrf>
    alter session set nls_numeric_characters = ".,";
          SELECT Msgid, Msgid1, Sttlmmtd
       FROM   data_table t,Xmltable(Xmlnamespaces('urn:S2SCTScf:xsd:$SCTScfBlkCredTrf' AS "A", 'urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02' AS "B")
                        ,'/A:SCTScfBlkCredTrf/B:FIToFICstmrCdtTrf' Passing t.data Columns
                        Msgid Path 'A:SndgInst'
                        ,Msgid1 Path 'B:GrpHdr/B:MsgId'
                        ,Sttlmmtd Path 'B:GrpHdr/B:SttlmInf/B:SttlmMtd');
    MSGID             ;MSGID1           ;STTLMMTD         ;
                     ;006MSID12511PH712;INGA             ;
    The idea was to :
    1). Map the Column Names for the XPath built using the previous code.
    2). Build the Select statement shown above dynamically based on the Xpath built in the previous code using a PLSQL block, and to process the data by doing a bulk collect on the XML.
    The above XML may contain multiple <FIToFICstmrCdtTrf></FIToFICstmrCdtTrf> nodes.
    Since the name space in the XML varies for each version of the SEPA messages , i need to get the names spaces ALSO to be picked up dynamically and parse the XML data based on the select statement as shown above.
    Could you please guide me with
    1). Is the approach taken appropriate?
    2). Any alternative approach should be looked for ?
    3). How to extract the name spaces available in the XML?
    Thanks.

  • Extract XML output to file using PL/SQL

    Hi.
    Since Oracle 8.1.4.7.1 I am using XML output in my applications.
    With that version of Oracle, my method was:
    1. Make the select;
    2. Create a file somewhere in my C drive;
    3. Create the XML file header;
    3. For each row, insert into the file, with the correct format;
    4. Close the file;
    ... and, voilá ... the XML file was made.
    Now, with the Oracle 10g, I know that I have much more ways to do it:
    1. Package DBMS_XMLQUERY
    2. Statements like
    "SELECT XMLELEMENT("USERS", XMLELEMENT("nome_pessoa", e.nome_pessoa ||' - '|| e.login), XMLELEMENT ( "password", e.password)) AS "result"
    FROM pessoa e"
    3. Or finally using XML SQL Utility.
    My question, is that if there is any way that i can make it all of this automatically. If there is any procedure or method that allow me to do all this stuff in just one step:
    1. Select in XML output;
    2. Creation of file;
    3. Insertion of Select output in file and Close of File;
    Thankx,

    I'm assuming that you want to write to the file system of the server that the database is running on...
    you'll have to use utl_file
    See
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96612/u_file.htm

  • Search option using a new small window in oracle forms using pl/sql

    Hai Friend,
    Iam Navya Jeevan,regarding Oracle Forms and Reports Doubts.
    Our project is developed using Forms and Reports
    In Forms for triggers we are using Pl/SQl language.
    DOUBT
    IN a form we require an option like search button when we press the search button a small window must be opened.This window should contain details from database(ie an entire column of database,must be displayed in the window ) and the user selects the value from the window.
    If u got any sample code related to this subject please mail to me.
    ....................................VERY URGENT............................................................................
    thankyou,

    Hello,
    The LOV is made for this.
    Francois

  • # coming when I select data from oracle table using Native SQL

    Hi Gurus,
    I am selecting 'First name' from oracle table directly using native sql. I am fetching 65000 records but 10+ records having '#' at the end of firstname. For eg: John#.
    But oracle team couldn't find '#' in their table for those records. What could be problem?
    or what could be the character in oracle which comes as '#' in abap?
    Pls help...
    Saj

    Thanks for replies.
    My DB NLS_PARAMETER is AL32UTF8. I am able to pullout data with older version of ojdbc jar file. So I think there is no issue regarding NLS setting.
    So please guide me with proper solution as soon as possible.

  • Problem Dropping Objects in Oracle XE using PL/SQL Developer

    Hi all,
    I am using PL/SQL Developer to access Oracle XE. I created some tables and later dropped them. But I still see some objects in the PL/SQL Developer Browser under the Tables section.
    Below is the name of the objects in I see:
    bin$fj7zj7y9rhqujmwrz1zmtg==$0,
    bin$frxjknkot4cwtkexm4wtca==$0,
    bin$q2m8wls+s72szfufb+mnzw==$0,
    bin$syrcyj1bsqcelpfsodudrw==$0,
    bin$tjt8ipk6ras8qtx0zvn+6w==$0,
    bin$vc6dzazorg6zwemticqdha==$0,
    bin$xfrxhcb3s5ev8wkjfc/3vg==$0,
    bin$oyrdsi+us+yhhoprzdingq==$0,
    bin$vtk7saqqtecbhmdwpnp1bg==$0,
    bin$x1hhdhy+trmfponyldjwdw==$0
    When I tried dropping these objects, I get ORA - 00933: SQL Command not properly ended. Error deleting bin$fj7zj7y9rhqujmwrz1zmtg==$0
    How do I resolve this problem? And then drop all those objects listed above.
    Is it possible to drop those objects at all?
    Thanks in advance.
    Sam.

    There is no problem sofar. The objects you see are dropped objects ( if you drop it, oracle silently rename the object but preserve it as long you have sufficient space ).
    You shouldn't drop them if you don't have issue with free space - they enable you to get back accidentally dropped table without to have restore the backup ( flashback table). If you are annoyed by displaying it in PL SQL Developer, you can just add a filter to not show them to you ( all objects like 'bin%' ) or you can update to newrer version of PL SQL Developer ( i've 7.0.0.1050 and it is displayed properly, all dropped objects can be found under recyclebin folder ). Finally , if you want purge them, use the 'purge recyclebin' command.
    Best regards
    Maxim

  • How to generate formated (defined position) text and image using pl/sql and

    Hello,
    I need to use pl/sql to create a dynamic html page (or image , if possible) with defined positions for text and bar code. It is necessary because the page will be printed and it should be able to be read by one other process , OCR, that needs to have all the data in defined positions.
    Any suggestion are welcome.
    Thanks in advance,
    Emilio

    I don't think it's that easy. Notice that if you put the insert into an actual pl/sql block, you don't get the correct column pointer anymore.
    BEGIN insert into bob(col1, col2) values (123.12, 12345.12); END;
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    ORA-06512: at line 1
    Richard

  • "for XML path "  Oracle equivalent of this SQL expression

    SELECT TheID,
    REPLACE(
    RTRIM(
    SELECT StudentID + ' '
    FROM StudentinSchoolLocation TL
    WHERE (LocationID = Results.LocationID)
    FOR XML PATH ('')
    ) AS StudentIDs,
    What is the equivalent of 'For XML path' used above
    The goal is to get a concatenated list of the group by columns. Like where ever the location is same , get the studentIds and make a comma seperated list of all ids for common location
    Works perfectly in SQL.
    Thank you

    Hi,
    user6287828 wrote:
    The goal is to get a concatenated list of the group by columns. Like where ever the location is same , get the studentIds and make a comma seperated list of all ids for common locationThat's called "String Aggregation"
    [AskTom.oracle.com|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402] shows several different ways to do it.
    I recommend the first one, the user-defined function STRAGG, which you can copy from that page.
    On Oracle 10 (and up) you may have a similar function, WM_CONCAT (owned by WMSYS), already installed.
    WM_CONCAT is not documented, so you may not want to use it in your Production applications.
    STRAGG is not so convenient if the order of items in the concatenated string is important.
    In that case, use XMLAGG or SYS_CONNECT_BY_PATH, as shown later in the asktom page.
    MODEL can also do ordered string aggregation.

  • Multi-Value Parameters to Oracle Stored Procedures via SQL Commands

    Hi,
    When you used stored procedure in CR, you need to declare REF CURSOR, This type of cursor is a dynamic cursor not a static cursor. Hence, you are able to manipulate dataset in this type of cursor.
    Regards,
    Titanium0203

    As far as I know the documentation on CR & stored procedures says that the REF CURSOR has to be a strongly bound one.
    Could you go into a little more detail? Do you mean I should put a multi-valued parameter into a REF CURSOR? Can you post some code snippets here?

  • Printing Arabic text in Oracle Application(R12i) using XML Publisher.

    Hi,
    I am using Oracle Application R12i version with Oracle database as 10g, base language as English and installed language as Arabic.
    I am trying to print the data which is there in English/Arabic in Oracle Application(using XML Publisher).
    I've created a rdf using Report Builder 10g and registered as concurrent program (XML as Output format). There after i executed the concurrent program and generated the XML file.
    Based on the XML file, i created a rtf file using XML Desktop(in Ms word) and register the same rtf file in XML Publisher Administrator for creating the XML definition and Template and Output as PDF.
    After creating a XML template, when i executed the Concurrent program, english text is shown in english but arabic text is shown some ascii characters like Question Mark(up side down).
    Could anyone please let us know the steps for doing the same or plz let us know are we missing any step.
    Quiet urgent.
    You could also reply to [email protected]
    Thanks in advance
    Your help will be appreciated.
    Edited by: user10772035 on Aug 20, 2009 10:23 PM

    Same Problem here, if you are able to solve it, please also help me.

  • Nesting xml in Oracle 8i

    How to generate nested xml/ complex xml in Oracle 8i using 8i packages dbms_xmlquery or xmlgen .
    The xml might be looked like this..
    if any body have idea then pls let me know.
    i am trying to write Stored procedure on that i am using query like select c1,c2, cursor(c3,c4 from xyb) from ABC
    but not getting required output
    <?xml version="1.0" ?>
    - <File>
    <File_Type>ETNL_TRAVELR_PAYMENTS</File_Type>
    - <File_Header_Record>
    <File_Format_Version>0002</File_Format_Version>
    <Creation_Module />
    </File_Header_Record>
    - <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    - <Transaction_Header>
    <Record_Number>1</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    - <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF DOM EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    - <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    - <Amounts>
    - <Transaction_Amount>
    <Amount>154.00</Amount>
    <Currency>GBP</Currency>
    </Transaction_Amount>
    </Amounts>
    - <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    - <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>K</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D562</Account_ID>
    </Account>
    </Bank_Account>
    - <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>K</Code_Type>
    - <Code>
    - <![CDATA[ 538111
      ]]>
    </Code>
    </Bank_Route_Code>
    - <Bank_Address_Info>
    - <Name>
    - <![CDATA[ Natwest
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Long Sutton Branch
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ 25 market Place
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Spalding
      ]]>
    </City>
    <Country>GB</Country>
    </Bank_Address_Info>
    </Bank>
    - <Account>
    - <Account_Number>
    - <![CDATA[ 12345678
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ John Doe
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ EmployeeCity
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>CF375YL</Postal>
    <Country>GB</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    - <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000999
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    - <Comments>
    - <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    - <References>
    - <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021004001542
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    + <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    + <Transaction_Header>
    <Record_Number>2</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    + <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF DOM EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    + <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    - <Amounts>
    - <Transaction_Amount>
    <Amount>46.00</Amount>
    <Currency>EUR</Currency>
    </Transaction_Amount>
    </Amounts>
    - <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    - <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>G</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D202</Account_ID>
    </Account>
    </Bank_Account>
    - <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>G</Code_Type>
    - <Code>
    - <![CDATA[ 234543
      ]]>
    </Code>
    </Bank_Route_Code>
    - <Bank_Address_Info>
    - <Name>
    - <![CDATA[
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[
      ]]>
    </Street2>
    - <City>
    - <![CDATA[
      ]]>
    </City>
    <Country />
    </Bank_Address_Info>
    </Bank>
    - <Account>
    - <Account_Number>
    - <![CDATA[ DE65100700000123456789
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ Test User
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Berlin
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>1234323</Postal>
    <Country>DE</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    - <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000888
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    - <Comments>
    - <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    - <References>
    - <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021101001053
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    + <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    + <Transaction_Header>
    <Record_Number>3</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    + <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF INTL EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    + <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    + <Amounts>
    + <Transaction_Amount>
    <Amount>265.00</Amount>
    <Currency>EUR</Currency>
    </Transaction_Amount>
    </Amounts>
    + <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    + <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D202</Account_ID>
    </Account>
    </Bank_Account>
    + <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    - <Code>
    - <![CDATA[
      ]]>
    </Code>
    </Bank_Route_Code>
    + <Bank_Address_Info>
    - <Name>
    - <![CDATA[
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[
      ]]>
    </Street2>
    - <City>
    - <![CDATA[
      ]]>
    </City>
    <Country />
    </Bank_Address_Info>
    </Bank>
    + <Account>
    - <Account_Number>
    - <![CDATA[ NL02ABNA0123456789
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ New User
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Ansterdam
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>34242</Postal>
    <Country>NL</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    + <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000777
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    + <Comments>
    + <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    + <References>
    + <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021101001025
      ]]>
    </Reference_Value>
    </Reference>
    + <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    + <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    + <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    - <Transaction_Header>
    <Record_Number>4</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    - <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF INTL EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    - <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    - <Amounts>
    - <Transaction_Amount>
    <Amount>34.70</Amount>
    <Currency>EUR</Currency>
    </Transaction_Amount>
    </Amounts>
    - <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    - <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D202</Account_ID>
    </Account>
    </Bank_Account>
    - <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    - <Code>
    - <![CDATA[
      ]]>
    </Code>
    </Bank_Route_Code>
    - <Bank_Address_Info>
    - <Name>
    - <![CDATA[
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[
      ]]>
    </Street2>
    - <City>
    - <![CDATA[
      ]]>
    </City>
    <Country />
    </Bank_Address_Info>
    </Bank>
    - <Account>
    - <Account_Number>
    - <![CDATA[ FR313000400828000123456789
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ French User
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Paris
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>54333</Postal>
    <Country>FR</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    - <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000666
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    - <Comments>
    - <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    - <References>
    - <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021101001481
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    - <File_Trailer_Record>
    <File_Name>ETNL_TRAVELR_PAYMENTS</File_Name>
    <Total_Records>4</Total_Records>
    </File_Trailer_Record>
    </File>
    regards
    Ramashankar Sahu

    As I recall from my 8i days (it's been many years), the only way to do this is to install the XML XDK. From http://www.oracle.com/technology/tech/xml/xdk/xdk_java.html, it says "The Oracle9i versions of the XDK can also be used to build applications designed to interface with Oracle8i databases." I had thought the 10g version could do that as well but I'm not seeing it now.
    Since XMLType was not part of 8i, you will need to use PL/SQL to take your Select statement results and build them into a DOMDocument structure.
    Hope that helps.

  • OLAP cubes from heterogeneous data sources using XML DB

    hi.
    Q:1
    How we can create an OLAP cube (XML cubes) from XML data sources if using XML DB.
    Q:2
    How we can create an OLAP cubes from warehouses and flat files and covert these cubes into XML cubes.
    Q:3
    Is there any other tool (Except Analytical workspace manager AWM) which supports the construction of OLAP cubes in XML format from heterogeneous data sources?
    Edited by: user11236392 on Aug 21, 2009 3:50 AM

    Hi Stuart!
    Your undersatnding is partially correct. i am working for providing an architecture for XOLAP, XML is one of my data source.
    The idea is to generate uniform cubes from heterogeneous sources that can be integrated into a global cube. instead of building Oracle OLAP cubes from all the sources (this work is already done) i want to generate an XCube from XML data sources using XQuery.
    On the other hand if we have generated the Oracle OLAP cube from other sources like warehouses or flat files. i have to convert these Oracle OLAP cube into XML cube for uniformity. in an research paper i find that there is an operator Xcube embedded in XQuery which converts the multidimensional data (cube) into XML cube. im looking for the implementation of this operator in Query that how this operator works.
    hope u understand my architecture. but if u still have some confusion, kindly give me ur mail id. i will mail the diagram of my architecture.
    thanks.
    saqib

  • How to create multi-level style pulling in a .jpg image as a bullet?

    From within RoboHelp 8 HTML, when creating/editing a 3-tier multi-level style, I want to use a .jpg image for the bullet(s).  I can not find a way to point to the image while in Edit mode.  My only choices are predefined bullets for the List Style.
    When searching for an answer within the forum, I noticed mention of a Baggage folder in RoboHelp.  I do not have a Baggage folder.  I do have links to websites accessible from within the web-based Help file I've created beneath the URLs folder in the Project Manager.
    Thank you for any help you can provide.

    Hi there
    I never really played much with adding images to the oddly formatted Multi-list styles.
    The Project Manager has two views. Sounds like you are using the new "global" view. In that view you don't see a special area labeled Baggage Files. In this view the files are simply listed among the other content. If you change the view to Classic (I think it's the first icon on the left of the pod toolbar) you will then see the Baggage Files folder.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

Maybe you are looking for