Creation of External table by using XML files.

I am in the process of loading of XML file data into the database table. I want to use the External Table feature for this loading. Though we have the external table feature with Plain/text file, is there any process of XML file data loading into the Database table by using External table?
I am using Oracle 9i.
Appreciate your responses.
Regards
Edited by: user652422 on Dec 16, 2008 11:00 PM

Hi,
The XML file which U posted is working fine and that proved that external table can be created by using xml files.
Now My problem is that I have xml files which is not as the book.xml, my xml file is having some diff format. below is the extracts of the file ...
<?xml version="1.0" encoding="UTF-8" ?>
- <PM-History deviceIP="172.20.7.50">
<Error Reason="" />
- <Interface IntfName="otu2-1-10B-3">
- <TS Type="15-MIN">
<Error Reason="" />
- <PM-counters TimeStamp="02/13/2008:12:15">
<Item Name="BBE-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="BBE-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="ES-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="ES-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="SES-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="SES-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="CSES-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="CSES-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="UAS-S" Direction="Received" Validity="ADJ" Value="135" />
<Item Name="UAS-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="SEF-S" Direction="Received" Validity="ADJ" Value="135" />
</PM-counters>
<PM-counters TimeStamp="03/26/2008:12:30">
<Item Name="BBE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="BBE-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="ES" Direction="Received" Validity="OFF" Value="0" />
<Item Name="ES-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="SES" Direction="Received" Validity="OFF" Value="0" />
<Item Name="SES-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="CSES" Direction="Received" Validity="OFF" Value="0" />
<Item Name="CSES-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="UAS" Direction="Received" Validity="OFF" Value="0" />
<Item Name="UAS-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="PSC" Direction="Received" Validity="OFF" Value="0" />
</PM-counters>
</TS>
</Interface>
</PM-History>
My problem is the Item Name and Direction the value of both(ex PSCReceived or UASReceived) will be treated as the coulmn name of the table and '0' would be the value of that column. I am confused how to create the external table creation program for that.
I would really appreciate your responses.
Regards

Similar Messages

  • Use of External tables to load XML data.

    Hi,
    I have used external table definitions to load various XML files to the database, usually splitting the XML into seperate records - 1 per major element tag, and using PL/SQL to parse out a primary key to store in a relational table with all of the XML relevant to that primary key value stored as an XMLTYPE coumn in a row of the table. This has worked fine for XML with a single major entity (element tag) .
    However, I now have an XML file that contains two "major" elements (both children of the root) that I would like to split out and store in seperate tables.
    The XML file is of the following basic format:-
    <drugs>
    <drug>drug 1...</drug>
    <drug>drug 2...</drug>
    <partners>
    <partner>partner 1</partner>
    <partner>partner 2</partner>
    </partners>
    </drugs>
    The problem is there are around 18000 elements of the first type, followed by several thousand of the 2nd type. I can create two seperate external tables - one for each element type, but how do I get the external table for the 2nd to ignore all the elements of the first type? My external table definition is :-
    CREATE TABLE DRUGBANK_OWNER.DRUGBANK_PARTNERS_XML_EXTERNAL
    DRUGBANK_XML CLOB
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DRUGBANK_DIR
    ACCESS PARAMETERS
    ( records delimited by "</partner>" SKIP 100000
    characterset al32utf8
    badfile extlogs:'drugbank_partners_xml.bad'
    logfile extlogs:'drugbank_partners_xml.log'
    discardfile extlogs:'drugbank_partners_xml.dis'
    READSIZE 52428800
    fields
    drugbank_xml CHAR(50000000) terminated by '</partners>'
    LOCATION (DRUGBANK_DIR:'drugbank.xml')
    REJECT LIMIT UNLIMITED
    PARALLEL ( DEGREE 8 INSTANCES 1 )
    NOMONITORING;
    The problem is that before the first <partners> element the 1800 or so <drugs> elements cause a data cartrdige error:-
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04020: found record longer than buffer size supported, 52428800
    This happens regardless of the value of the SKIP or the size of the drugbank_xml field.
    I have tried using an OR on the "records delimited by" access parameter, to 'delimit by "</partner>" OR "</drug>"', with the intention of filtering out the <drug> elements but this leads to a syntax error.
    Anyone ever tried anything similar and got it to work?
    Any other suggestions?
    Thanks,
    Sid.

    No, the content inside quotes is spanned across multiple lines....there are line breaks after every html tag.
    "What's the error message you are getting?"
    Iam not getting any error while selecting from external table , but I am getting tose rows in BAD file and log file has the following entries
    KUP-04021: field formatting error for field TKBS_DSCN
    KUP-04036: second enclosing delimiter not found
    Message was edited by:
    user627610

  • Importing data- using xml file into HANA Table

    Hi,
    We are using (HDB STUDIO ) - revision 60.......
    Is it possible to import data using XML file into HANA table (Master,Fact tables)?
    (Without using any intermediate adapters for conversion of data.....)
    Can any one suggest us........
    Thank you.

    Hi user450616
    I am a bit confused about what you are trying to achieve.
    Are you:
    1. importing a CSV file into APEX
    2. adding an extra column to the Oracle Table
    3. populating the extra column with the CSV filename?
    Let us know if this is what you are trying to do.
    Cheers,
    Patrick Cimolini

  • Exporting data from database tables to a XML file

    Hi,
    We want to export data from Oracle database tables to an XML
    file. What tool can we use for this purpose, and how do we go
    about it ?
    Can we extract data only from an Oracle8 database, or can we
    extract data from Oracle7.3 databases too ?
    Any help in this regard would be appreciated.
    Thanks
    Dipanjan
    null

    Dipanjan (guest) wrote:
    : Hi,
    : We want to export data from Oracle database tables to an XML
    : file. What tool can we use for this purpose, and how do we go
    : about it ?
    : Can we extract data only from an Oracle8 database, or can we
    : extract data from Oracle7.3 databases too ?
    : Any help in this regard would be appreciated.
    : Thanks
    : Dipanjan
    Start by downloading the XML SQL Utility and make sure you have
    the approriate JDBC 1.1 drivers installed for your database.
    There are samples which will get you going included in the
    archive.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Inserting data from  a table  to an XML file

    I want to insert the values from this xml file emp.xml into a table Employees :
    <EMPLOYEES>
    <EMP>
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    </EMP>
    <EMP>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    </EMP>
    <EMP>
    </EMPLOYEES>
    and here is my Employee table in Oracle 9i database
    SQL> DESC EMPLOYEE;
    Name Null? Type
    EMPNO NUMBER
    EMPNAME VARCHAR2(10)
    JOB VARCHAR2(10)
    HIREDATE DATE
    SAL NUMBER
    After getting help from the members i was able to do the insert of data from the xml file to the table..how to do the insert of data from the table to the xml file.
    Regards,
    Renu

    Hello michaels , thank you for the solution, still i am having some problems
    Here is what i have done :
    1.
    SQL> CREATE DIRECTORY my_table_dir AS 'E:\table_files'
    2 ;
    Directory created.
    2.
    SQL> select * from myemp;
    ENAME
    SMITH
    ALLEN
    3.
    This is the content of the existing xml file saved in the directory E:\table_files as emp.xml
    <EMPLOYEES>
    <EMP>JIM</EMP>
    <EMP>RICK</EMP>
    </EMPLOYEES>
    4.
    Now i executed this code :
    declare
    emp_xml xmltype;
    begin
    select sys_xmlagg (column_value, sys.xmlformat ('EMPLOYEES')) emp_xml
    into emp_xml
    from table (xmlsequence (cursor (select *
    from myemp
    where ename in ('SMITH', 'ALLEN')),
    sys.xmlformat ('EMP')
    dbms_xslprocessor.clob2file (emp_xml.getclobval (), 'E:\table_files', 'emp.xml');
    end;
    And the Error i got is :
    declare
    ERROR at line 1:
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 18
    ORA-06512: at "SYS.UTL_FILE", line 424
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 46
    ORA-06512: at line 12

  • Internal table data to XML file.

    Hi All,
    May I know how can we convert the internal table data to xml file?
    Regards
    Ramesh.

    Re: Convert XML to internal Table
       Go through the link..u should be able to solve the problem..

  • How to use XML file as a source in BODS?

    How to use XML file as a source in BODS?
    Could anyone please help me out for this?

    exmpale XML file :
    <?xml version="1.0" encoding="utf-8"?>
    <MM_RECON_REPORT>
      <RPT_DATE>str1234</RPT_DATE>
      <RPT_ROW>
        <SRC_EXT_REC_COUNT>123.45</SRC_EXT_REC_COUNT>
        <PRE_TRANS_REC_COUNT>123.45</PRE_TRANS_REC_COUNT>
        <POST_TRANS_REC_COUNT>123.45</POST_TRANS_REC_COUNT>
        <PASS_BAPI_REC_COUNT>123.45</PASS_BAPI_REC_COUNT>
        <TOT_SAP_RETURN>123.45</TOT_SAP_RETURN>
        <TOT_SAP_SUCC_REC_COUNT>123.45</TOT_SAP_SUCC_REC_COUNT>
        <PARTIAL_SUCC_REC_COUNT>123.45</PARTIAL_SUCC_REC_COUNT>
        <TOT_SAP_ERR_REC_COUNT>123.45</TOT_SAP_ERR_REC_COUNT>
        <MM_SUCC_REC_COUNT>123.45</MM_SUCC_REC_COUNT>
        <MM_ERR_REC_COUNT>123.45</MM_ERR_REC_COUNT>
        <CLS_SUCC_REC_COUNT>123.45</CLS_SUCC_REC_COUNT>
        <CLS_ERR_REC_COUNT>123.45</CLS_ERR_REC_COUNT>
        <CP_SUCC_REC_COUNT>123.45</CP_SUCC_REC_COUNT>
        <CP_ERR_REC_COUNT>123.45</CP_ERR_REC_COUNT>
        <VMS_SUCC_REC_COUNT>123.45</VMS_SUCC_REC_COUNT>
        <VMS_ERR_REC_COUNT>123.45</VMS_ERR_REC_COUNT>
        <SOURCE_TYPE>str1234</SOURCE_TYPE>
        <RUN_ID>123.45</RUN_ID>
        <RUN_SEQ>123.45</RUN_SEQ>
        <RUN_DATE>2012-12-13</RUN_DATE>
      </RPT_ROW>
    </MM_RECON_REPORT>
    example XSD file :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:annotation>
        <xsd:documentation xml:lang="en">
        XML Schema generated by Data Services
        </xsd:documentation>
      </xsd:annotation>
    <xsd:simpleType name="DIType-decimal-28-0">
      <xsd:restriction base="xsd:decimal">
        <xsd:totalDigits value="28"/>
        <xsd:fractionDigits value="0"/>
      </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="DIType-varchar-200">
      <xsd:restriction base="xsd:string">
      <xsd:maxLength value="200"/>
      </xsd:restriction>
      </xsd:simpleType>
    <xsd:simpleType name="DIType-varchar-10">
      <xsd:restriction base="xsd:string">
        <xsd:maxLength value="10"/>
      </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="DATE">
      <xsd:restriction base="xsd:date">
      </xsd:restriction>
      </xsd:simpleType>
    <xsd:element name="MM_RECON_REPORT" >
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="RPT_DATE" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="RPT_ROW"  minOccurs="0" maxOccurs="unbounded"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    <xsd:element name="RPT_DATE" type = "DIType-varchar-200"/>
    <xsd:element name="RPT_ROW" >
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="SRC_EXT_REC_COUNT" />
            <xsd:element ref="PRE_TRANS_REC_COUNT" />
            <xsd:element ref="POST_TRANS_REC_COUNT" />
            <xsd:element ref="PASS_BAPI_REC_COUNT" />
            <xsd:element ref="TOT_SAP_RETURN" />
            <xsd:element ref="TOT_SAP_SUCC_REC_COUNT" />
            <xsd:element ref="PARTIAL_SUCC_REC_COUNT" />
            <xsd:element ref="TOT_SAP_ERR_REC_COUNT" />
            <xsd:element ref="MM_SUCC_REC_COUNT" />
            <xsd:element ref="MM_ERR_REC_COUNT" />
            <xsd:element ref="CLS_SUCC_REC_COUNT" />
            <xsd:element ref="CLS_ERR_REC_COUNT" />
            <xsd:element ref="CP_SUCC_REC_COUNT" />
            <xsd:element ref="CP_ERR_REC_COUNT" />
            <xsd:element ref="VMS_SUCC_REC_COUNT" />
            <xsd:element ref="VMS_ERR_REC_COUNT" />
            <xsd:element ref="SOURCE_TYPE" />
            <xsd:element ref="RUN_ID" />
            <xsd:element ref="RUN_SEQ" />
            <xsd:element ref="RUN_DATE" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    <xsd:element name="SRC_EXT_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="PRE_TRANS_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="POST_TRANS_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="PASS_BAPI_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="TOT_SAP_RETURN" type = "DIType-decimal-28-0"/>
    <xsd:element name="TOT_SAP_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="PARTIAL_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="TOT_SAP_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="MM_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="MM_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CLS_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CLS_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CP_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CP_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="VMS_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="VMS_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="SOURCE_TYPE" type = "DIType-varchar-10"/>
    <xsd:element name="RUN_ID" type = "DIType-decimal-28-0"/>
    <xsd:element name="RUN_SEQ" type = "DIType-decimal-28-0"/>
    <xsd:element name="RUN_DATE" type = "xsd:date"/>
    </xsd:schema>
    compare the xml vs xsd for better understanding

  • Debugging mode stopped automatically when using xml file load

    Dear Sir,
    I am trying to develop a new add-on using xml files for creating new forms. In fact I was using the sample code delivered with the SDK ( WorkingWithXml - under VB.NET). The Problem is that when I am in the debuging mode and after the form load. the application goes out of the debugging mode and stop action.
    In fact what i was trying to do first is to create a new menu and then when i click on this menu a new form appear but once the menu is loaded the application stop the debugging mode automatically.
    Can somebody clarify to me what I am doing wrong and why the debugging mode is stopped automatically, noting that i am still in the add-on developpement phase.
    As i mentioned above i used the WorkingWithXml sample code (VB.NET) and i have adjusted in a way to load menu and then on the menu click i load my form.
    Please advice
    Best Regards

    Hi Mary,
    Put your code between in a Try Catch block. In the Catch part use the following:
    oApplication.MessageBox("CompError: " & oCompany.GetLastErrorCode.ToString & ", " & oCompany.GetLastErrorDescription & vbCrLf & "Message: " & ex.Message)
    This should give you a clearer idea of what the error is all about.
    The most likely reason is that there is something wrong with your XML file.
    Regards,
    Vítor Vieira

  • Using XML Files for Message Bundles

    Hi There,
    does anybody knows if there is an easy way to use xml files instead of property files for the strings stored in MessageBundles (Locale)?
    Cheers Lars

    Oki,
    found XMLResourceBundle. No more action on your side is required, Thanx anyway...
    Bye

  • Publish app that uses XML file.

    Hi, I want to create an App which uses XML file as a data source. I want that XML file is online file on my server downloaded in first use, and looking for changes every time user want to do this, so i have a legal question if apple can release my app in AppStore or they can block it?

    Thanks,
    I have legal right, this is my XML file on my server.
    My main concern is that changing XML in fact i may change entire app. And this make me think apple would not like it. So my question is: maybe someone had similar experience.

  • How to write a procedure to load the data into a table using xml file as input to the procedure?

    Hi,
    Iam new to the xml,
    can u please anyone help me how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me.
    <?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>.
    Regards,
    vikram.

    here is the your XML parse in 11g :
    select *
      from xmltable('//Entity' passing xmltype
    '<?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>
    ') columns
      "dcode" varchar2(4000) path '/Entity/dcode',
      "ddesc" varchar2(4000) path '/Entity/ddesc',
      "reauthflag" varchar2(4000) path '/Entity/reauthflag'
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    Using this parser you can create procedure as
    SQL> create or replace procedure myXMLParse(x clob) as
      2  begin
      3    insert into MyXmlTable
      4      select *
      5        from xmltable('//Entity' passing xmltype(x) columns "dcode"
      6                      varchar2(4000) path '/Entity/dcode',
      7                      "ddesc" varchar2(4000) path '/Entity/ddesc',
      8                      "reauthflag" varchar2(4000) path '/Entity/reauthflag');
      9    commit;
    10  end;
    11 
    12  /
    Procedure created
    SQL>
    SQL>
    SQL> exec myXMLParse('<?xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>');
    PL/SQL procedure successfully completed
    SQL> select * from MYXMLTABLE;
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    SQL>
    Ramin Hashimzade

  • How to export table contents in xml file format through SQL queries

    hi,
    i need to export the table data in to xml file format. i got it through the GUI what they given.
    i'm using Oracle 10g XE.
    but i need to send the table name from Java programs. so, how to call the export commands from programming languages through. is there any sql commands to export the table contents in xml format.
    and one more problem is i created each transaction in two tables. for example if we have a transaction 'sales' , that will be saved in db as
    sales1 table and sales2 table. here i maintained and ID field in sales1 as PK. and id as FK in sales2.
    i get the combined data with this query,
    select * from sales1 s1, sales2 s2 where s1.id=s2.id order by s1.id;
    it given all the records, but i'm getting two ID fields (one from each table). how to avoid this. here i dont know how many fields will be there in each table. that will be known at runtime only.
    the static information is sales1 have one ID field with PK and sales2 will have one ID filed with FK.
    i need ur valuable suggestions.
    regards
    pavan.

    You can use DBMS_XMLGEN.getXML('your Query') for generating data in tables to XML format and you can use DBMS_XMLGEN.SETROWSETTAG to change the parent element name other wise it will give rowset as well as DBMS_XMLGEN.SETROWTAG for row name.
    Check this otherwise XMLELEMENT and XMLFOREST function are also there to convert data in XML format.

  • Need to insert values into a table from a XML file

    Hi,
    I'm an Oracle 9i/10g DBA with quite a few years experience, but I'm new to XML and dealing with it in database terms. I've been given a project that entails pulling XML values out of a file (or 100's of them) and storing them in the database so that they are searchable by end-users. The project is classified as secret so I'm unable to upload the specific XML or any info relating to the structire of the XML or the table I will use to insert the values into - sorry!! So, I've created an XML file with a similar structure to help people understand my predicament.
    The end-users only need to search on a subset of the total amount of columns from the table I'll insert data into, although the XML file has a lot more, so I dont need to store the other values - but I will need to store the name of the XML file (or a pointer to it so I know what XML file a particular set of values belong to) in another column of the table along with its associated values.
    I've been using the XMLTABLE function with some degree of success, although I had better succes using the XMLSEQUENCE function. However, I found out this is deprecated in 10g and replaced with XMLTABLE, so I guess it's better if I use this in case we ever need to upgrade to 11g.
    The main problem I've been having is that some elements in the XML files have multiple values for the one record when all the other records are the same. In terms of storing this in the database, I guess it would mean inserting multiple rows in the table for each element where the value differs. Here is a dumbed down XML file similar to what I've got along with the other SQL I've used:
    +<?xml version="1.0" encoding="UTF-8"?>+
    +<House>+
    +<Warehouse>+
    +<WarehouseId>1</WarehouseId>+
    +<WarehouseName>+
    +<Town>Southlake</Town>+
    +<State>Texas</State>+
    +</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>+
    +<Warehouse>+
    +<WarehouseId>2</WarehouseId>+
    +<WarehouseName>+
    +<Town>Poole</Town>+
    +<State>Dorset</State>+
    +</WarehouseName>+
    +<WarehouseName>+
    +<Town>Solihull</Town>+
    +<County>West Midlands</State>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>40000</Area>+
    +<Docks>5</Docks>+
    +<DockType>Rear load</DockType>+
    +<WaterAccess>true</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Bay</Parking>+
    +<VClearance>10</VClearance>+
    +</Warehouse>+
    +<Warehouse>+
    +<WarehouseId>3</WarehouseId>+
    +<WarehouseName>+
    +<Town>Fleet</Town>+
    +<County>Hampshire</County>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>10000</Area>+
    +<Docks>1</Docks>+
    +<DockType>Side load</DockType>+
    +<WaterAccess>false</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Bay</Parking>+
    +<VClearance>20</VClearance>+
    +</Warehouse>+
    +</House>+
    CREATE TABLE xmltest OF XMLTYPE;
    INSERT INTO xmltest
    VALUES(xmltype(bfilename('XML_DIR', 'test.xml'), nls_charset_id('AL32UTF8')));
    Consequently, I need to...
    1) Retrieve the results from the XML file for all 3 warehouses where multiple values for the same sub-element are shown as 2 rowsthe result set. (I am guessing there will be 4 rows returned as warehouse sub-2 has 2 different elements for <WarehouseName>.
    2) Build a case statement into the query so that regardless of the sub-element name (i.e State or County), it is returned into the 1 column, for instance County.
    So, if I run a query similar to the following...
    select y.WarehouseId, y.Town, y.County, y.Area
    from xmltest x, xmltable('/House/Warehouse' .......
    I would like to get results back like this...
    ID Town County Area
    1 Southlake Texas 25000
    2 Poole Dorset 40000
    2 Solihull West Midlands 40000
    3 Fleet hampshire 10000
    Sorry for the non-formatting but I hope this all makessense to someone out there with what I'm trying to do.
    I appreciate any help whatsoever because, as i said before, I'm totally new to XML and trying to read the vast amount of information there is out there on XML is all a bit daunting.
    Many thanks in advance,
    Shaun.

    Hi again,
    Thanks for keeping the post open for me. I've had a look at the post illustrating the XFileHandler package, and tried to alter it to make it fit with my XML files. To help explain things, my XML file looks like this:
    <?xml version="1.0"?>
    <!DOCTYPE  CMF_Doc SYSTEM "CMF_Doc.dtd">
    <House>
        <Warehouse>
        <WarehouseId>1</WarehouseId>
        <WarehouseName>
           <Town>Southlake</Town>
           <State>Texas</State>
        </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>
      <Warehouse>House
        <WarehouseId>2</WarehouseId>
        <WarehouseName>
           <Town>Poole</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Solihull</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>40000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>3</WarehouseId>
        <WarehouseName>
           <Town>Fleet</Town>
           <County>Hampshire</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>
    <?xml version="1.0" encoding="UTF-8"?>
    <House>
        <Warehouse>
        <WarehouseId>4</WarehouseId>
        <WarehouseName>
           <Town>Dallas</Town>
           <State>Texas</State>
        </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>
      <Warehouse>
        <WarehouseId>5</WarehouseId>
        <WarehouseName>
           <Town>Dorchester</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Solihull</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>40000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>6</WarehouseId>
        <WarehouseName>
           <Town>Farnborough</Town>
           <County>Hampshire</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>
    <?xml version="1.0" encoding="UTF-8"?>
    <House>
        <Warehouse>
        <WarehouseId>7</WarehouseId>
        <WarehouseName>
           <Town>Southlake</Town>
           <State>Texas</State>
        </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>
      <Warehouse>
        <WarehouseId>8</WarehouseId>
        <WarehouseName>
           <Town>Bournemouth</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Shirley</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>30000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>9</WarehouseId>
        <WarehouseName>
           <Town>Clapham</Town>
           <County>London</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>And the XFilehandler package looks like this (I'm just trying to do a simple select only on WarehouseId & WaterAccess for the time being to keep things simple):
    create or replace package XFileHandler as
      TYPE TRECORD IS RECORD (
        WID     NUMBER(2)
      , WACCESS VARCHAR2(5)
      type TRecordTable is table of TRecord;
      function getRows (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipelined;
    end;
    create or replace package body XFileHandler is
      function getRows (p_directory in varchar2, p_filename in varchar2)
       return TRecordTable pipelined
      is
        nb_rec          number := 1;
        tmp_xml        clob;
        tmp_file         clob;
        rec               TRecord;
      begin
        DBMS_LOB.CREATETEMPORARY(TMP_FILE, TRUE);
        tmp_file := dbms_xslprocessor.read2clob(p_directory, p_filename);
        LOOP
          tmp_xml := regexp_substr(tmp_file, '<\?xml[^?]+\?>\s*<([^>]+)>.*?</\1>', 1, nb_rec, 'n');
          exit when length(tmp_xml) = 0;
          --dbms_output.put_line(tmp_rec);
          nb_rec := nb_rec + 1;
        select y.WID, y.WACCESS
        into rec.WID, rec.WACCESS
        from xmltable('/House' passing xmltype(tmp_xml)
                      columns WID NUMBER(2) PATH 'Warehouse/WarehouseId',
                                  WACCESS VARCHAR2(5) PATH 'WaterAccess') y;
          pipe row ( rec );
        end loop;
        dbms_lob.freetemporary(tmp_file);
        return;
      end;
    end;Now, when I run the query:
    select * from table(XFileHandler.getRows('XML_DIR', 'XFileHandler_test.xml'));I get the error: ORA-00600: internal error code, arguments: [17285], [0x5CFE8DC8], [4], [0x45ABE1C8], [], [], [], []
    I had a look in the dump file for anything obvious, but nothing really stands out. Is there anything obvious in my code that I'm missing or something else which you may think could be causing this error, e.g in the regular expression regexp_substr?
    Many thanks,
    Shaun.

  • External table refere to a file in subfolder location

    Hi,
    I'm trying to link a external table to a file in a subfolder in a file location in OWB. Is this possible or do i need to make a new connectior for every folder i want to use for an external file?
    The server is an AIX server. So for example:
    - Location1 is refering to /POS
    But i want to use a file located in /POS/BLA
    regards,
    Osman
    Edited by: Ossy81 on Nov 5, 2009 3:39 PM

    Yes. Here the input from user guide:
    Describing the Flat File Module
    Type a name and an optional description for the flat file module.
    Recall that you create a module for each folder in your file system from which you want to sample existing files or to which you want to create new files. Therefore,
    consider naming the module based on the folder name. Each file module corresponds to one folder in the file system.
    For example, to import flat files from c:\folder1 and a subfolder such as c:\folder1\subfolder,create two file modules such as C_FOLDER1 and C_FODLER1_SUBFOLDER.

  • Creating a PL/SQL table based on XML file.

    I have created two procedures to try and achieve the problem at hand.
    It retrieves and displays the record from a DBMS_OUTPUT.PUT_LINE prospective as indicated in (1&2), but I am having difficulty loading these values into a PL/SQL table from the package labeled as (3).
    All code compiles. (1&2) work together, (3) works by itself but will not populate the table, and I get no errors.
    1.The first being the one that retrieves the XML file and parses it.
    CREATE OR REPLACE procedure xml_main is
    P XMLPARSER.Parser;
    DOC CLOB;
    v_xmldoc xmldom.DOMDocument;
    v_out CLOB;
    BEGIN
    P := xmlparser.newParser;
    xmlparser.setValidationMode(p, FALSE);
    DOC := '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <com.welligent.Student.BasicStudent.Create>
    <ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" messagePriority="1" messageType="Sync">
    <Sender>
    <MessageId>
    <SenderAppId>com.openii.SyncRouter</SenderAppId>
    <ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
    <MessageSeq>53</MessageSeq>
    </MessageId>
    <Authentication>
    <AuthUserId>Router</AuthUserId>
    </Authentication>
    </Sender>
    <Datetime>
    <Year>2001</Year>
    <Month>3</Month>
    <Day>23</Day>
    <Hour>13</Hour>
    <Minute>47</Minute>
    <Second>30</Second>
    <SubSecond>223</SubSecond>
    <Timezone>6:00-GMT</Timezone>
    </Datetime>
    </ControlAreaSync>
    <DataArea>
    <NewData>
    <BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
    <StudentNumber>052589F201</StudentNumber>
    <ExternalIdNumber>1234567890</ExternalIdNumber>
    <StateIdNumber>123456</StateIdNumber>
    <Name>
    <LastName>Lopez</LastName>
    <FirstName>Maria</FirstName>
    <MiddleName>S</MiddleName>
    </Name>
    <Gender>Female</Gender>
    <BirthDate>
    <Month>1</Month>
    <Day>1</Day>
    <Year>1995</Year>
    </BirthDate>
    <Race>Hispanic</Race>
    <Ethnicity>Hispanic</Ethnicity>
    <PrimaryLanguage>English</PrimaryLanguage>
    <HouseholdLanguage>Spanish</HouseholdLanguage>
    <Address>
    <Street>123 Any Street</Street>
    <ApartmentNumber>12-D</ApartmentNumber>
    <City>Los Angeles</City>
    <County>Los Angeles</County>
    <State>CA</State>
    <ZipCode>90071</ZipCode>
    </Address>
    </BasicStudent>
    </NewData>
    </DataArea>
    </com.welligent.Student.BasicStudent.Create>';
    --v_out  := DOC;
    SYS.XMLPARSER.PARSECLOB ( P, DOC );
    v_xmldoc := SYS.XMLPARSER.getDocument(P);
    --DBMS_LOB.createtemporary(v_out,FALSE,DBMS_LOB.SESSION);
    --v_out := SYS.XMLPARSER.PARSECLOB ( P, DOC );
    --SYS.XMLDOM.writetoCLOB(v_xmldoc, v_out);
    --INSERT INTO TEST (TEST_COLUMN)
    --VALUES(V_OUT);
    --printElements(v_xmldoc);
    printElementAttributes(v_xmldoc);
    exception
    when xmldom.INDEX_SIZE_ERR then
    raise_application_error(-20120, 'Index Size error');
    when xmldom.DOMSTRING_SIZE_ERR then
    raise_application_error(-20120, 'String Size error');
    when xmldom.HIERARCHY_REQUEST_ERR then
    raise_application_error(-20120, 'Hierarchy request error');
    when xmldom.WRONG_DOCUMENT_ERR then
    raise_application_error(-20120, 'Wrong doc error');
    when xmldom.INVALID_CHARACTER_ERR then
    raise_application_error(-20120, 'Invalid Char error');
    when xmldom.NO_DATA_ALLOWED_ERR then
    raise_application_error(-20120, 'Nod data allowed error');
    when xmldom.NO_MODIFICATION_ALLOWED_ERR then
    raise_application_error(-20120, 'No mod allowed error');
    when xmldom.NOT_FOUND_ERR then
    raise_application_error(-20120, 'Not found error');
    when xmldom.NOT_SUPPORTED_ERR then
    raise_application_error(-20120, 'Not supported error');
    when xmldom.INUSE_ATTRIBUTE_ERR then
    raise_application_error(-20120, 'In use attr error');
    END;
    2. The second which displays the values from the .xml file I initialized above.
    CREATE OR REPLACE procedure printElementAttributes(doc xmldom.DOMDocument) is
    nl XMLDOM.DOMNODELIST;
    len1           NUMBER;
    len2 NUMBER;
    n      XMLDOM.DOMNODE;
    e      XMLDOM.DOMELEMENT;
    nnm      XMLDOM.DOMNAMEDNODEMAP;
    attrname VARCHAR2(100);
    attrval VARCHAR2(100);
    text_value VARCHAR2(100):=NULL;
    n_child XMLDOM.DOMNODE;
    BEGIN
    -- get all elements
    nl := XMLDOM.getElementsByTagName(doc, '*');
    len1 := XMLDOM.getLength(nl);
    -- loop through elements
    FOR j in 0..len1-1 LOOP
    n := XMLDOM.item(nl, j);
    e := XMLDOM.makeElement(n);
    DBMS_OUTPUT.PUT_LINE(xmldom.getTagName(e) || ':');
    -- get all attributes of element
    nnm := xmldom.getAttributes(n);
         n_child:=xmldom.getFirstChild(n);
    text_value:=xmldom.getNodeValue(n_child);
    dbms_output.put_line('val='||text_value);
    IF (xmldom.isNull(nnm) = FALSE) THEN
    len2 := xmldom.getLength(nnm);
              dbms_output.put_line('length='||len2);
    -- loop through attributes
    FOR i IN 0..len2-1 LOOP
    n := xmldom.item(nnm, i);
    attrname := xmldom.getNodeName(n);
    attrval := xmldom.getNodeValue(n);
    dbms_output.put(' ' || attrname || ' = ' || attrval);
    END LOOP;
    dbms_output.put_line('');
    END IF;
    END LOOP;
    END printElementAttributes;
    3. The package trying to insert into a PL/SQL table.
    CREATE OR REPLACE PACKAGE BODY XMLSTUD2 AS
    PROCEDURE STUDLOAD
    IS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    DOC CLOB;
    v_out CLOB;
    n2 XMLDOM.DOMNODELIST;
    TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
    s_tab stuxml_type := stuxml_type();
    --l_sturec students%rowtype;
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, FALSE);
    DOC := '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <com.welligent.Student.BasicStudent.Create>
    <ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" messagePriority="1" messageType="Sync">
    <Sender>
    <MessageId>
    <SenderAppId>com.openii.SyncRouter</SenderAppId>
    <ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
    <MessageSeq>53</MessageSeq>
    </MessageId>
    <Authentication>
    <AuthUserId>Router</AuthUserId>
    </Authentication>
    </Sender>
    <Datetime>
    <Year>2001</Year>
    <Month>3</Month>
    <Day>23</Day>
    <Hour>13</Hour>
    <Minute>47</Minute>
    <Second>30</Second>
    <SubSecond>223</SubSecond>
    <Timezone>6:00-GMT</Timezone>
    </Datetime>
    </ControlAreaSync>
    <DataArea>
    <NewData>
    <BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
    <StudentNumber>052589F201</StudentNumber>
    <ExternalIdNumber>1234567890</ExternalIdNumber>
    <StateIdNumber>123456</StateIdNumber>
    <Name>
    <LastName>Lopez</LastName>
    <FirstName>Maria</FirstName>
    <MiddleName>S</MiddleName>
    </Name>
    <Gender>Female</Gender>
    <BirthDate>
    <Month>1</Month>
    <Day>1</Day>
    <Year>1995</Year>
    </BirthDate>
    <Race>Hispanic</Race>
    <Ethnicity>Hispanic</Ethnicity>
    <PrimaryLanguage>English</PrimaryLanguage>
    <HouseholdLanguage>Spanish</HouseholdLanguage>
    <Address>
    <Street>123 Any Street</Street>
    <ApartmentNumber>12-D</ApartmentNumber>
    <City>Los Angeles</City>
    <County>Los Angeles</County>
    <State>CA</State>
    <ZipCode>90071</ZipCode>
    </Address>
    </BasicStudent>
    </NewData>
    </DataArea>
    </com.welligent.Student.BasicStudent.Create>';
    -- Parse the document and create a new DOM document.
    SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
    v_doc := SYS.XMLPARSER.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the STUD nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address');
    dbms_output.put_line( 'New Stud processed on '||to_char(sysdate, 'YYYY-MON-DD'));
    -- Loop through the list and create a new record in a tble collection
    -- for each STUD record.
    FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, stud);
    s_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
         --s_tab(s_tab.last).STUDENT_ID :=xslprocessor.valueOf(v_n,'StudentNumber');
         --s_tab(s_tab.last).SSN :=xslprocessor.valueOf(v_n,'ExternalIdNumber');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'StateIdNumber');
         s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'LastName');
         --dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
         s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'FirstName');
         --s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'MiddleName');
         --s_tab(s_tab.last).STUDENT_GENDER :=xslprocessor.valueOf(v_n,'Gender');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Month');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Day');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Year');
         --s_tab(s_tab.last).STUDENT_RACE :=xslprocessor.valueOf(v_n,'Race');
         --s_tab(s_tab.last).STUDENT_ETHNIC :=xslprocessor.valueOf(v_n,'Ethnicity');
         --s_tab(s_tab.last).STUDENT_PRI_LANG :=xslprocessor.valueOf(v_n,'PrimaryLanguage');
         --s_tab(s_tab.last).STUDENT_SEC_LANG :=xslprocessor.valueOf(v_n,'HouseholdLanguage');
         --s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'Street');
         --s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'ApartmentNumber');
         --s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'City'); 
         --s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'County');
         --s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'State');
         --s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'ZipCode');
    END LOOP;
    FOR stud IN s_tab.first..s_tab.last LOOP
    dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
    INSERT INTO STUDENTS (
    SHISID, SSN, DOE_SCHOOL_NUMBER,
    PATIENT_TYPE, TEACHER, HOMEROOM,
    STUDENT_LAST_NAME, STUDENT_FIRST_NAME, STUDENT_MI,
    STUDENT_DOB, STUDENT_BIRTH_CERT, STUDENT_COMM,
    STUDENT_MUSA, STUDENT_FAMSIZE, STUDENT_FAMINCOME,
    STUDENT_UNINSURED, STUDENT_LUNCH, STUDENT_ZIP,
    STUDENT_STATE, STUDENT_COUNTY, STUDENT_STREET,
    STUDENT_APART_NO, STUDENT_PHONE, STUDENT_H2O_TYPE,
    STUDENT_WASTE_TRT, STUDENT_HOME_SET, STUDENT_NONHOME_SET,
    STUDENT_GENDER, STUDENT_RACE, STUDENT_ETHNIC,
    STUDENT_PRI_LANG, STUDENT_SEC_LANG, STUDENT_ATRISK,
    EMER_COND_MEMO, ASSIST_DEVICE_TYPE, SCHOOL_ENTER_AGE,
    STUDENT_CURR_GRADE, S504_ELIG_DATE, S504_DEV_DATE,
    S504_REV_DATE, STUDENT_504, STUDENT_IEP,
    IEP_EXP_DATE, GRAD_CLASS, TYPE_DIPLOMA,
    GRADE_RETAIN, LIT_PASS_TEST_MATH, LIT_PASS_DATE_MATH,
    LIT_PASS_TEST_WRITE, LIT_PASS_DATE_WRITE, LIT_PASS_TEST_READ,
    LIT_PASS_DATE_READ, SPEC_ED_ELIG, SPEC_ED_CODE,
    TRANSPORT_CODE, TRANSPORT_NO, PRIME_HANDICAP,
    PRIME_HANDICAP_PERCENT, PRIME_HANDI_MANAGER, FIRST_ADD_HANDI,
    FIRST_ADD_HANDICAP_PERCENT, FIRST_ADD_HANDI_504, FIRST_ADD_HANDI_504_DATE,
    SECOND_ADD_HANDI, SECOND_ADD_HANDICAP_PERCENT, MED_EXTERNAL_NAME,
    INS_TYPE, INS_PRI, INS_NAME,
    INS_MEDICAID_NO, ELIGDATE, INS_PRIV_INSURANCE,
    INS_APPR_BILL, INS_APPR_DATE, INS_PARENT_APPR,
    INS_POL_NAME, INS_POL_NO, INS_CARRIER_NO,
    INS_CARRIER_NAME, INS_CARRIER_RELATE, INS_AFFECT_DATE,
    INS_COPAY_OV, INS_COPAY_RX, INS_COPAY_AMBUL,
    INS_COPAY_EMER, INS_COPAY_OUTPAT, STUDENT_INACTIVE,
    PHYS_ID, ENCOUNTERNUM, USERID,
    MODDATE, STUDENT_ID, S504_DISABILITY,
    CHAPTER1, WELLNESS_ENROLL, SCHOOL_OF_RESIDENCE,
    INITIAL_IEP_DATE, CALENDAR_TRACK, USA_BORN,
    ALT_ID, FUTURE_SCHOOL, IEP_LAST_MEETING,
    IEP_LAST_SETTING, IEP_LAST_REFER_EVAL, THIRD_ADD_HANDI,
    LEP, GIFTED, IEP_EXIT_REASON,
    CASE_MANAGER_ID, INTAKE_NOTES, CALLER_PHONE,
    CALL_DATE, CALLER_RELATIONSHIP, CALLER_NAME,
    BUSINESS_PHONE, FAX, EMAIL,
    HIGHEST_EDUCATION, INTAKE_DATE, SERVICE_COORDINATOR,
    DISCHARGE_DATE, DISCHARGE_REASON, DISCHARGE_NOTES,
    INTAKE_BY, INTAKE_STATUS, IEP_LAST_SERVED_DATE,
    IEP_APC_DATE, IEP_EXIT_DATE, ADDRESS2,
    LEGAL_STATUS, RELIGION, EMPLOYMENT_STATUS,
    TARG_POP_GROUP1, TARG_POP_GROUP2, MARITAL_STATUS,
    THIRD_ADD_HANDI_PERCENT, LAST_INTERFACE_DATE, SERVICE_PLAN_TYPE,
    CURRENT_JURISDICTION, FIPS, BIRTH_PLACE_JURISDICTION,
    BIRTH_PLACE_HOSPITAL, BIRTH_PLACE_STATE, BIRTH_PLACE_COUNTRY,
    OTHER_CLIENT_NAME, SIBLINGS_WITH_SERVICES, PERM_SHARE_INFORMATION,
    PERM_VERIFY_INSURANCE, REFERRING_AGENCY, REFERRING_INDIVIDUAL,
    AUTOMATIC_ELIGIBILITY, INTAKE_IEP_ID, FUTURE_SCHOOL2,
    FUTURE_SCHOOL3, TRANSLATOR_NEEDED, TOTAL_CHILDREN_IN_HOME,
    REFERRED_BY, FAMILY_ID, SCREENING_CONSENT_FLAG,
    PICTURE_FILE, DUAL_ENROLLED, DOE_SCHOOL_NUMBER2)
    VALUES (123456789012, null,null ,
    null,null,null ,s_tab(stud).STUDENT_LAST_NAME
    , s_tab(stud).STUDENT_LAST_NAME,null ,
    null ,null ,null ,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null, null,null );
    END LOOP;
    COMMIT;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    xmldom.freeDocument(v_doc);
    END STUDLOAD;
    END XMLSTUD2;
    /

    Hi
    I have created a PLSQL package based Oracle Portal
    form. This is created a s a databse provider. I have
    following questions to check :
    1. How to capture return values from the package and
    display different messages on success or failure ?
    - http://download.oracle.com/docs/cd/B14099_19/portal.1014/b14135/pdg_portletbuilder.htm#BABBAFGI
    Step 16
    2. How to return to blank form by intializing already
    entered values after successfuly process of the form
    data.
    - http://download.oracle.com/docs/cd/B14099_19/portal.1014/b14135/pdg_portletbuilder.htm#BABGBCHH
    thanks
    Manjith

Maybe you are looking for

  • Creative Zen M is froz

    It froze while i was listening to it and the screen is stuck at that moment. I tried powering it off, plugging it into my pc, ac adapter and nothing is working. do i need to reset it's will i lose my music if i do?

  • I dont know my i cloud and need to get in i pad what do i do

    i have a ipad that i havent used in a long time. i forgot my password so i restarted the whole thing now its asking for the i cloud i used on the ipad but thit was my moms icloud and she passed away and now i have no way of getting access into the ip

  • Fields Disabled in ADOBE Interactive Form

    Hi Guys, While developing a WebDynpro application which have ADOBE form into it. We want to make this form as an interactive form, but the fields remain disabled and is not allowing for entering any value. Please not that we do not have SAP Portal in

  • Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

    Getting the following error: Microsoft OLE DB Provider for ODBC Drivers error '80040e10' [Microsoft][ODBC driver for Oracle]Wrong number of parameters I have a Stored Procedure within a package that has no input parameter and 2 output parameters.. oC

  • Converting from JDK 1.0 to JDK 1.1    -deprecated classes.

    as the above topic explains. this is my code, i still get the -deprecated error even after i replace the classes. i need major help pls! import java.awt.*; import java.applet.*; import java.awt.event.*; public abstract class snake extends Applet impl