How to load XML file as is to database table  ?? CLOB

I want to store a XML file into the database and then use
Intermedia search facility to search the document. How can i
achieve it. Searching the document has been pretty well
explained. But i don't find an example showing storing a file as
is to a table in a CLOB. If somebody can guide me it will be
helpful. I'm new to intermedia stuff.
I'm using oracle 8.1.7 database.
Pls mail me at [email protected]
Thanx in advance
Arun

Please check the feature of the day "Searching for content and
structure in XML documents". Note that works with 9i.
http://otn.oracle.com/products/oracle9i/daily/nov30.html
I want to store a XML file into the database and then use
Intermedia search facility to search the document. How can i
achieve it. Searching the document has been pretty well
explained. But i don't find an example showing storing a file as
is to a table in a CLOB. If somebody can guide me it will be
helpful. I'm new to intermedia stuff.
I'm using oracle 8.1.7 database.
Pls mail me at [email protected]
Thanx in advance
Arun

Similar Messages

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • How to Load XML files into Oracle 8 database.

    My company is currently using Oracle Aplications V. 10.7 character mode and intend to migrate to V.11.0.3 in the next months.
    We want to import data (XML format) in the OE module using Open Interfaces.
    How to proceed ?

    This forum is dedicated to the XML Features of 9iR2, and to a lesser extent 9i. Questions related to XML and earlier versions of the database should be posted in Technologies -> General -> XML...
    I will move this thread to the appropriate forum if required.

  • Generate XML file from an Oracle Database Table

    Hello All,
    I want to generate a xml file from an Oracle Database table which contains a blob column.
    Can somebody give pointers on this please.
    Thanks in advance
    Sulakshana

    Use the DBMS_XMLGEN package.

  • How to load XML file to table (non-XML) with SQL*Loader -- issue with nulls

    I have been attempting to use SQL*Loader to load an XML file into a "regular" Oracle table. All fields work fine, unless a null is encountered. The way that nulls are represented is shown below:
    <PAYLOAD>
    <FIELD1>ABCDEF</FIELD1>
    <FIELD2/>
    <FIELD3>123456</FIELD3>
    </PAYLOAD>
    In the above example, FIELD2 is a null field and that is the way it is presented. I have searched everywhere and have not found how I could code for this. The issue is that if FIELD2 is present, it is coded like: <FIELD2>SOMEDATA</FIELD2>, but the null is represented as <FIELD2/>. Here is a sample of the control file I am using to attempt the load -- very simplistic, but works fine when fields are present:
    load data
    infile 'testdata.xml' "str '<PAYLOAD>'"
    TRUNCATE
    into table DATA_FROM_XML
    FIELD1 ENCLOSED BY '<FIELD1>' AND '</FIELD1>',
    FIELD2 ENCLOSED BY '<FIELD2>' AND '</FIELD2>',
    FIELD3 ENCLOSED BY '<FIELD3>' AND '</FIELD3>')
    What do I need to do to account for the way that nulls are presented? I have tried everything I could glean from the web and the documentation and nothing has worked. Any help would be really appreciated.

    I hadn't even got that far. can you direct me to where the docs are to import data that is stored within xml but that you don't need any xml functionality, that just happens to be the format the data is stored in? thx

  • How to load XML files ? HELP!

    Hi folks.
    We have an old Oracle database 7.3..
    So we need to load XML files into its tables.
    As we understand Oracle Loader doesn't help us.
    Is the way to load that files?
    Thanks in advance
    Alex

    I know you realize 7.3 is old but this is sort of like trying trying to view a DVD when you only have a VCR. Simple answer would be buy a DVD player, i.e. upgrade to a more recent version of Oracle where you will get many features to handle XML.
    How do you want the XML loaded, all as a single object? That could be a CLOB column if 7.3 had them, I am not sure. You would probably have to write PL/SQL and something with UTL_FILE (if 7.3 had that) to load it.
    If you want to put it multiple columns based on its tags, you would be better off parsing it using PERL (or something) into a CSV and loading that in SQL*Loader.
    I assume as this is using XML it is a reasonably recent design, combining that with an ancient version of the database is just going to lead to endless headaches.

  • How to load XML file to DB

    Hi All,
    My requirement is I have a XML file, its data should be stored in Database.
    Below is the sample XML file.
    <?xml version="1.0"?>
    <PaymentInfoMessageResponse>
    <PaymentInfoResponse>
    <TransactionType>940</TransactionType>
    <SequenceNum>04</SequenceNum>
    <CompanyCode>902</CompanyCode>
    </PaymentInfoResponse>
    <StatusCode>OK</StatusCode>
    <StatusDetail>OK</StatusDetail>
    <ResponseItemCount>2</ResponseItemCount>
    </PaymentInfoMessageResponse>
    I have a table with columns name say TransType,SeqNum
    the value 940,04 from XML file should be saved in TransType,SeqNum Column respectively
    I am using file adapter with native format builder,selecting file type as complex type and
    In design schema,I'm not able to proceed,i'm getting error in POP up as:
    Native Format builder:error
    No global elements exist.
    How can i proceed or any other way to load XML file to DB.
    urgent Help/suggestion is required.
    Thanks in advance

    HI all,
    1)If my input is .txt file.
    we can use file adapter,using native builder,sample it,
    delimited/fixed length, we can do normal file read and file write/DB write.It works fine.
    2)If my input file is xml file,we can't use native builder format(Because it doesn't support
    delimited/fixed length/complex character in native format builder).
    so,as said in the above reply,i took a sample XML file & converted to XSD using
    File Menu > New > All Technologies tab > General > XML > XML Schema from XML Document.
    It compiles fine.
    Now,if i use file adapter(read) -- BPEL -- File adapter(write).
    Inside Transform,i am mapping filereadVariable and filewrite Variable correctly.
    If my input file is Abc.xml and its contents in read file are:
    <?xml version="1.0"?>
    <PaymentInfoMessageResponse>
    <PaymentInfoResponse>
    <TransactionType>940</TransactionType>
    <SequenceNum>04</SequenceNum>
    <CompanyCode>902</CompanyCode>
    </PaymentInfoResponse>
    <StatusCode>OK</StatusCode>
    <StatusDetail>OK</StatusDetail>
    </PaymentInfoMessageResponse>
    In write folder,my contents are
    <PaymentInfoMessageResponse>
    <imp1:PaymentInfoResponse>
    <imp1:TransactionType/>
    <imp1:SequenceNum/>
    <imp1:ReceiptTime/>
    <imp1:CompanyCode/>
    </imp1:PaymentInfoResponse>
    <imp1:StatusCode/>
    <imp1:StatusDetail/>
    </PaymentInfoMessageResponse>
    Now,if i use file adapter(read) -- BPEL -- DB adapter(merge).
    Inside Transform,i am mapping filereadVariable and DBmerge Variable correctly.
    If my input file is Abc.xml and its contents in read file are:
    <?xml version="1.0"?>
    <PaymentInfoMessageResponse>
    <PaymentInfoResponse>
    <TransactionType>940</TransactionType>
    <SequenceNum>04</SequenceNum>
    <CompanyCode>902</CompanyCode>
    </PaymentInfoResponse>
    <StatusCode>OK</StatusCode>
    <StatusDetail>OK</StatusDetail>
    </PaymentInfoMessageResponse>
    My output in em console is like this.
    <CeStatementHeadersIntCollection>
    <top:CeStatementHeadersInt>
    <top:statementNumber/>
    <top:bankName/>
    </top:CeStatementHeadersInt>
    </CeStatementHeadersIntCollection>
    NO data is being inserted into DB.
    I can write my XMl file into write folder as it is using opaque object(No native format translation)
    I can write XML file into DB using BLOB data type.
    But my requirement is:
    I have a table with columns name say TransType,SeqNum
    the value 940,04 from above XML file should be saved in TransType,SeqNum Columns respectively.
    Can i do it using DOM parser/SAX parser?
    So any suggestion/help required
    Thanks in advance

  • Load xml file data in oracle 9i table

    Hi,
    I have oracle 9i R2 (9.2.0.8) and currently i am loading data using sql*loader as i am getting text file. I will be getting file in XML format shortly.
    I would like tp know if there is a sql*loader way to load xml file or another easy method that i can use it?
    If you can provide me very simplest way, i will really appreciate it.
    Thanks,

    Please refer
    http://download-uk.oracle.com/docs/cd/B12037_01/appdev.101/b10790/xdb25loa.htm

  • Creating XML file using data from database table

    I have to create an xml file using the data from multiple table. The problem That i am facing is the data is huge it is in millions so I was wondering that is there any efective way of creating such an xml file.
    It would be great if you can suggest some approach to achieve my requirement.
    Thanks,
    -Vinod

    An example from the forum: Re: How to generate xml file from database table
    Edited by: Marco Gralike on Oct 18, 2012 9:41 PM

  • How to load XML File to BW Delta Queue via Webpage

    Hello altogether,
    I am trying to load an CSV file via Webpage (the Webpage have to change the csv file in a xml/soap file) into BW Delta Queue.
    Steps that I have made:
    - Create an InfoSource
    - Create an BW Data Source with Soap Connection
    - Create an initial Delta without Data Transfer
    - Create a Web Service with TC - SE37 - Utilities -> More Utilities -> Create Web Service
    If I test the Web Service with TC - Soamanager (BW 7.0), the data entered here, are transferred to the BW Delta Queue.
    If I test the function module ( TC - SE37), the data also transferred to the Delta Queue.
    Now I think, that I have an error in the html file or the html file is not conform to the wsdl document?? Or should I have to create a virtual interface, but I don't find a possibility to creat it...???
    Can you please help me????
    The coding of the WSDL Document and the Website is attached (I can also send you the coding and error message via mail, if you want). Sorry I don't know how to display here the coding. I try it with symbol "click to display the text code", but afterwards I get an error message from the website...   So let me please know your mail address and I send it via mail....
    I hope, that somebody can help me!!!!!
    Edited by: Alina99 on Sep 8, 2009 11:44 AM
    Error Message from BW:
    ...sap-env:envelope..... soap-env:body><soap-env:fault><faultcode>soap-env:Client</faultcode></faultstring xml:lang="eng">Virtual Interface Method&gt;_-BI0_-QI6AZ_XML_APPL2_RFC::urn:sap-com:document:sap:soap:functions:mc-style&lt;not supported</faultstring>.......
    Edited by: Alina99 on Sep 8, 2009 11:56 AM

    Hello,
    I have done all the necessary config in BW. However, as I mentioned earlier, we are still not up with XI so I am trying to load XML to BW delta queue.  The question still remains, how do I make make the XML file (on my desktop say) point to the BW so the InfoPackage picks up and places in the delta queue?  Even if I had XI, there has to be a way whereby BW looks for the XML file.  That is what I want to know and stuck at.
    Any detailed step by step help will be appreciated as always.
    Cheers

  • How to load XML files into ORACLE8i database?

    SAP data is being extracted into XML format (via IDOC) files which are being transferred to an ORACLE8i box. There will be a large amount of data transferred on a daily basis which will include updates and inserts. From all the information that I have read on this subject there are 2 options available :
    1. XML-SQL Utility - which converts XML into INSERT, UPDATE or DELETE SQL. There does not appear to be that much functionality available by this method for decodes, transformations on the input data.
    2. SQL*Loader - There was a statement in 1 piece of documentation stating that SQL*Loader could be used for loading XML format data files. I cannot however find any further information on how this is achieved or how it works.
    If anyone has any experience in loading XML format data files using either of the above methods (preferably SQL*Loader as it has more functionality) then could you please provide me with examples or guidance on this matter? Any help would be greatly appreciated as I am not familiar with XML format data files. I am from an Oracle 7.3 background but do not have much experience with Oracle 8 onwards.
    Disclaimer.
    Any views expressed in the above paragraphs are my own and not that of Hewlett Packard Ltd.

    We are loading XML into our database using CLOB datatypes. We don't use the XSU for inserts as it is too slow. We parse the incoming XML document into a PL/SQL record type and then build a generic insert. This might not work well if you have many tags to parse into columns. We also store the entire XML CLOB into a column without parsing the individual tags into separate columns. We then use Intermedia Text for fast, index-based searching within the XML column.
    Check out The Oracle XML Portal website for code examples on how to do this:
    www.webspedite.com/oracle

  • How to load xml file data

    hi ,
    I know how to load data from csv file...
    Anyone can guide me for how to load data from xml file
    i need step by step guidence
    from
    naman

    hi naman shah,
    you can used XML DOM in SAP in order to read data from xml file
    first step to do that, you need to read the xml file using OPEN DATASET
    after that you convert the content of the file to XML DOM class in SAP using function modul SDIXML_XML_TO_DOM
    after that you can read / manipulate the data from xml.
    for the XML DOM class documentation in SAP, please refer to http://help.sap.com/saphelp_crm50/helpdata/en/bb/576637dca511d4990b00508b6b8b11/frameset.htm
    hopes it helps
    regards
    eddhie

  • How to load XML files into oracle

    I am new to XML.I have a few XML files.I want to load them into oracle.I have oracle client on my win2000 machine version 8.1.6.3.
    I cannot find Loadjava.jar file in ORACLE_HOME\bin directory.
    Where is the XSU-dsl and the XDK utility?Do i need to down load it?

    This forum is dedicated to the XML Features of 9iR2, and to a lesser extent 9i. Questions related to XML and earlier versions of the database should be posted in Technologies -> General -> XML...
    I will move this thread to the appropriate forum if required.

  • How to load XML file for Custom Pod in 7.5?

    I'm developing a custom pod for our Connect 7.5 deployment, and I'm attempting to load an XML file that resides in the assets/ folder of my project. I run the pod in Flash Builder 4.5 to debug and it works just fine. Whenever I load the pod into our Connect 7.5 solution, it appears as if none of the events for the URLLoader are triggered.
    Is there something else I need to do? Please help!  Note - I have tried loading XML both from an actual URL and locally. Both work fine in the IDE just not when pod is in Connect.
    Thanks

    Did you follow the guidelines in the Connect 6 SDK documentation? This document was applicable from version 6 through 7.5.
    http://help.adobe.com/en_US/Connect/6.0/SDK/help.pdf
    Your SWF needs to be named index.swf to work, as I recall.

  • How to load XML audit trail into an oracle table

    Gents,
    I have a task to load XML sys audit information into a database table.
    Here is a sample audit.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Audit xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd">
    <Version>11.1</Version>
    <AuditRecord><Audit_Type>8</Audit_Type><EntryId>1</EntryId><Extended_Timestamp>2011-05-04T15:44:08.311370</Extended_Timestamp><DB_User>/</DB_User><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Terminal>pts/11</Terminal><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
    <Sql_Text>CONNECT</Sql_Text>
    </AuditRecord>
    <AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>1</StatementId><EntryId>2</EntryId><Extended_Timestamp>2011-05-04T15:44:12.496857</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
    <Sql_Text>ALTER DATABASE OPEN</Sql_Text>
    </AuditRecord>
    <AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>4</StatementId><EntryId>3</EntryId><Extended_Timestamp>2011-05-04T15:44:32.863959</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
    <Sql_Text>SELECT name, value
    FROM gv$parameter
    WHERE name LIKE '%audit%'</Sql_Text>
    </AuditRecord>
    <AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>5</StatementId><EntryId>4</EntryId><Extended_Timestamp>2011-05-04T15:44:50.448443</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
    <Sql_Text>select count(*) from v$session</Sql_Text>
    </AuditRecord>
    <AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>6</StatementId><EntryId>5</EntryId><Extended_Timestamp>2011-05-04T15:46:37.680404</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
    <Sql_Text>select count(*) from v$session</Sql_Text>
    </AuditRecord>
    </Audit>
    I am using the following code to load it:
    create or replace directory test_dir as '/dbms/oracle/work/sh82993'
    drop table xxrp_acct_header
    create table xxrp_acct_header (
    Audit_Type number,
    Sql_Text varchar2(100)
    DECLARE
    acct_doc xmltype := xmltype( bfilename('TEST_DIR','dbmsdev_ora_720942_1.xml')
    , nls_charset_id('UTF-8') );
    BEGIN
    insert into xxrp_acct_header (Audit_Type, Sql_Text)
    select *
    from xmltable(
    '/Audit/AuditRecord'
    passing acct_doc
    columns Audit_Type path 'Audit_Type'
    , Sql_Text path 'Sql_Text'
    END;
    COMMIT;
    select * from xxrp_acct_header
    However I am having problems with the <Audit .... > tag.
    If a strip the rest following Audit I can get it working but if I leave the part:
    xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd">
    the loading will not work.
    Any ideas?
    All will be appreciated.
    steven

    odie_63 wrote:
    Hi,
    The XML has a default namespace, so you must declare it in XMLTable :
    SELECT *
    FROM XMLTable(
    XMLNamespaces(default 'http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd'),
    '/Audit/AuditRecord'
    passing acct_doc
    columns Audit_Type number        path 'Audit_Type'
    , Sql_Text   varchar2(100) path 'Sql_Text'
    Hi ,
    Can you please tell how can I load the data in the column "Extended_Timestamp" , I defined the column with datatype "TIMESTAMP" in the table but its giving error 'ORA-01830: date format picture ends before converting entire input string" .
    I also tried to add a column with datatype "TIMESTAMP(6) with time Zone" but still giving the same error. What shld be the datatype of the column which will store the corresponding data from extended_timestamp or do I need to format the insert statement , if yes then how ?
    Thanks.

Maybe you are looking for