How to retrieve xml soap column data into a clob table

Hello

I'm trying to retrieve the value of the clob column XML tag.

Name of the table = xyz and column = abc (clob data type)

data stored in the column to abc is as below

"" < soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:head ="http://www.abc.com/gcgi/shared/system/header" xmlns:v6 = "http://www.abc.com/gcgi/services/v6_0_0_0" xmlns ="http://www.abc.com/gcgi/shared/system/systemtypes" > ""

"< soapenv:Header xmlns:wsa = 'http://www.w3.org/2005/08/addressing' > '.

"< RqHeader soapenv:mustUnderstand ="0"xmlns ="http://www.abc.com/gcgi/shared/system/header">."

< DateAndTimeStamp > 2011-12-20T 16: 02:36.677 + 08:00 < / DateAndTimeStamp >

< UUID > 1000002932 < / UUID >

6_0_0_0 < version > < / Version >

< ClientDetails >

< Org > CBA < / Org >

< OrgUnit > CBA < / OrgUnit >

< channelId% > HBK < / ChannelID >

< TerminalID > 0000 < / TerminalID >

< SrcCountryCode > SG < / SrcCountryCode >

< DestCountryCode > SG < / DestCountryCode >

< UserGroup > HBK < / UserGroup >

< / ClientDetails >

< / RqHeader >

< wsa: action >/SvcImpl/Bank /.

SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq < / wsa: action > < / soapenv:Header >

< soapenv:Body >

< v6:AlertDeleteInqRq >

< v6:Base >

< v6:VID > 20071209013112 < / v6:VID >

<!-in option: - >

< v6:Ref > CTAA00000002644 < / v6:Ref >

< / v6:Base >

< / v6:AlertDeleteInqRq >

< / soapenv:Body >

< / soapenv:Envelope >

And I want to retrieve the values of tag

< channelId% > and < v6:VID >

can help someone, I tried with extractvalue but not able to get the values

e210e26a-5109-4E16-9e40-d6c719094b0d wrote:

Select x.* esb_output_temp t

, xmltable (xmlnamespaces ('http://schemas.xmlsoap.org/soap/envelope' as "soapenv"))

'http://www.abc.com/gcgi/shared/system/header', 'head ',.

( http://www.abc.com/gcgi/services/bank/alerts/v6_0_0_0' as 'v6')

,'/ soapenv:Envelope' to xmlparse (document t.med_req_payload)

columns ChannelID varchar2 (10)

path ' soapenv: / header/head: RqHeader / head: ClientDetails / head: ChannelID'

, Path of varchar2 (30) VID ' soapenv:Body / v6:AlertDeleteInqRq / v6:Base / v6:VID'

) x ;

Get the error:

ORA-19112: error raised during the evaluation:

XVM-01003: [XPST0003] syntax error in ' soapenv:'

1 declare namespace soapenv is http://schemas.xmlsoap.org/soap/envelope;. Statement

.

^

If you do not run the exact query I posted. Why?

You have changed the uri of namespace associated with the prefix of 'http://schemas.xmlsoap.org/soap/envelope/' to 'http://schemas.xmlsoap.org/soap/envelope' soapenv, see the difference?

and there is a syntax error in the expression of path ChannelID: soapenv: / header

See my example again once, you need not to tamper with it, at least not until you understand what you are doing.

Tags: Database

Similar Questions

  • How to load several files column data into essbase using the rule of load.

    Hello

    I need to load a file of data into essbase, which includes data from several columns.

    Here is a sample file.


    Year, Department, account, Jan, Feb, Mar, Apr, may, June, July, August, Sept, Oct, Nov, Dec
    FY10, ministere1, account1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
    FY10, agencies2, account1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
    FY10, ministere3, account1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12


    Thank you
    Sirot

    But this isn't an error as such, that is to say that no data values have been changed so that they possible already exist in the database.
    If there is no release, they should be in a file of errors.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows?

    I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows so that I can do the calculations?

    If you start the https://forums.adobe.com/welcome Forums Index

    You will be able to select a forum for the specific Adobe products you use

    Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll

  • How to insert the legacy data into the QP_RLTD_MODIFIERS table?

    How insert Legacy data into the QP_RLTD_MODIFIERS table in the instance of R12.

    I would use the QP_Modifiers_PUB API. Process_Modifiers to push the old data on prices in R12.  QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environment, only the promos are given in this table).

  • How to insert 10,000 records test data into the emp table

    Hi I am new to oracle can someone please help me write a program so that I can insert the test data into the emp table
    SELECT       LEVEL empno,
                 DBMS_RANDOM.string ('U', 20) emp_name,
                 TRUNC (DBMS_RANDOM.VALUE (10000, 100000), 2) sal,
                 DBMS_RANDOM.string ('U', 10) job,
                 TO_DATE ('1990-01-01', 'yyyy-mm-dd')
                 + TRUNC (DBMS_RANDOM.VALUE (1, 6000), 0)
                   hiredate,
                 CASE
                   WHEN LEVEL > 10 THEN TRUNC (DBMS_RANDOM.VALUE (1, 11), 0)
                   ELSE NULL
                 END
                   mgr,
                 TRUNC (DBMS_RANDOM.VALUE (1, 5), 0) deptno
    FROM         DUAL
    CONNECT BY   LEVEL <= 10000
    
  • Load xml data into an Oracle table

    Hello

    I went through some threads in the forums itself, but for my requirement that nothing comes closer, I write my request. I have a XML like this
    <? XML version = "1.0"? >
    < ACCOUNT_HEADER_ACK >
    < HEADER >
    < STATUS_CODE > 100 < / STATUS_CODE >
    Check < STATUS_REMARKS > < / STATUS_REMARKS >
    < / Header >
    < DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 2 < / SEGMENT_NUMBER >
    PR Polytechnic < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 3 < / SEGMENT_NUMBER >
    < REMARKS > PR Polytechnic administration < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 4 < / SEGMENT_NUMBER >
    < REMARKS > rp Polytechnique finance < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 5 < / SEGMENT_NUMBER >
    < REMARKS > logistics Polytechnique rp < / COMMENTS >
    < / DETAILS >
    < / DETAILS >
    < HEADER >
    < STATUS_CODE > 500 < / STATUS_CODE >
    < STATUS_REMARKS > process exception < / STATUS_REMARKS >
    < / Header >
    < DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 20 < / SEGMENT_NUMBER >
    Basic Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 30 < / SEGMENT_NUMBER >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 40 < / SEGMENT_NUMBER >
    Finance basic Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 50 < / SEGMENT_NUMBER >
    Logistics base Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < / DETAILS >
    < / ACCOUNT_HEADER_ACK >

    Here is the xml structure of the master structure and child I want to insert data in Oracle tables using the sql * loader initially tried to create a control file, but I don't know how to terminate in the control file, so I created two control files

    load data
    INFILE 'acct.xml' ' str ' < / DETAIL >»»
    TRUNCATE
    in the xxrp_acct_detail table
    TRAILING NULLCOLS
    (
    dummy fill finished by "< DETAIL >."
    SEGMENT_NUMBER surrounded by '< SEGMENT_NUMBER >' and ' < / SEGMENT_NUMBER >, "
    REMARKS framed by 'Of REMARKS <>' and ' < / COMMENTS >.
    )


    load data
    ACCT.XML INFILE' "str" < / header > ' "»
    TRUNCATE
    in the xxrp_acct_header table
    fields terminated by '< HEADER >.
    TRAILING NULLCOLS
    (
    dummy fill finished by "< HEADER >."
    STATUS_CODE framed by '< STATUS_CODE >' and ' < / STATUS_CODE >. "
    STATUS_REMARKS surrounded by '< STATUS_REMARKS >' and ' < / STATUS_REMARKS >.
    )

    I refer to the same xml file in two control files, where with regard to the first control file, I was able to load the files but the second which I suppose as table header not able to load the records of rest. I get the below error.

    Sheet 2: Rejected - error on the XXRP_ACCT_HEADER, column DUMMY table.
    Field in the data file exceeds the maximum length
    Sheet 3: Rejected - error on the XXRP_ACCT_HEADER, column DUMMY table.
    Field in the data file exceeds the maximum length

    In fact if its possible to seggrate a control file so it will be very useful for me. I'm also open for the external table as option. Please help me in this regard.

    Thanks in advance.

    Concerning
    Mr. Nagendra

    Here are two possible solutions:

    (1) reading the headers and separate details using two XMLTables:

    DECLARE
    
     acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
    
    BEGIN
    
     insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
     select x1.status_code,
            x1.status_remarks,
            x2.segment_number,
            x2.remarks
     from xmltable(
      '/ACCOUNT_HEADER_ACK/HEADER'
      passing acct_doc
      columns header_no      for ordinality,
              status_code    number        path 'STATUS_CODE',
              status_remarks varchar2(100) path 'STATUS_REMARKS'
     ) x1,
     xmltable(
      '$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
      passing acct_doc as "d",
              x1.header_no as "hn"
      columns segment_number number        path 'SEGMENT_NUMBER',
              remarks        varchar2(100) path 'REMARKS'
     ) x2
     ;
    
    END;
    

    All first (alias X 1) retrieves all headers in separate lines. The HEADER_NO generated column is used to keep track of the position of the header into the document.
    Then, we join a second XMLTable (X 2), passing HEADER_NO, so that we can access the corresponding items in DETAIL.

    (2) reading with one XMLTable, but somewhat more complex XQuery:

    DECLARE
    
     acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
    
    BEGIN
    
     insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
     select x.*
     from xmltable(
      'for $i in /ACCOUNT_HEADER_ACK/HEADER
       return
        for $j in $i/following-sibling::DETAILS[1]/DETAIL
        return element r {$i, $j}'
      passing acct_doc
      columns status_code    number        path 'HEADER/STATUS_CODE',
              status_remarks varchar2(100) path 'HEADER/STATUS_REMARKS',
              segment_number number        path 'DETAIL/SEGMENT_NUMBER',
              remarks        varchar2(100) path 'DETAIL/REMARKS'
     ) x
     ;
    
    END;
    

    Here, we use an XQuery query to extract the information that we need.
    Basically it's the same logic as above, but with two nested loops which access each header, then each RETAIL location immediately after in the order of the documents.

    Here is the link to the documentation XMLTable and XQuery in Oracle:
    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28369/xdb_xquery.htm#CBAGCBGJ

  • Can I create an XSD from XML data into a CLOB?

    Environment:


    Oracle 11.2.0.3 EE on Solaris.


    Highly an XML newbie so please be nice!

    I spent the past few days pouring through the documentation and various articles, including this one, but... I need help.

    I am trying to extract XML data stored in a CLOB and produce a flat file for the user's consumption.

    They sent me what they think is the XSD for XML data, but when I look at the data in the CLOB I don't see tags in the XSD.

    I would like to produce a XSD based on real data to compare with what they sent.

    Is this possible?

    I am able to query XML data using the tags that I see in data using XMLTable and it works fine.

    Any help is greatly appreciated.

    -gary

    Welcome to the side of the world, where you're going to love it and curse, like any other piece of XML technology.

    So if I understand correctly, the scope of your operation is to extract information from an XML file and then write this information to the disk, correct?

    A few questions

    -Why did the XML stored in a CLOB instead of an XMLType column?  Without knowing the history of the system, it is a pertinent question.

    -What size are the XML?  I ask this question, it is because when the XML is stored in the columns of XMLType (relational structure object or XML BINARY SECUREFILE format), then Oracle can parse the XML much more easily when it is stored as a CLOB.  If the XML is small enough, you can see no difference in performance between the two.

    The Oracle DB itself has no built in the ability to generate a schema from an XML file.  To do this, you need to use a third-party tool that has this feature in.  For example, XML Spy can do.  Other tools as well, but that's what comes to mind first is what I use.  The only thing to remember is that the scheme he built is only an XML instance.  Other XML instances can be different and not valid against the schema you generated, but still valid against the original schema unknown.

    You can save the schema in the database and then use the XML to create an XMLType instance related to the schema and then validate the XML in this way.  An example XML DB FAQ and here's another one Re: validation of XML schema

    Hope that helps you continue.

  • How to consume a web service in ODI and put data into an oracle table

    Hello

    Is someone can please help me with this or just give me some advice.

    Thanks in advance

    You must now read this XML file using XML ODI driver and load the data into tables using interfaces.

  • How to update past due column date?

    Hello

    I created a project with start_date, Target_Date, Past_Due columns table.
    Past_Due = SYSDATE - Target_Date
    How can I update Past_Due column for each row in the table?
    -What can be a better way than to the refresh report page whenever it opens?
    -Where to write the code? In the procedure or page or article?

    Thank you
    Guy

    >

    WHAT CASE G = NULL THEN NULL OTHER CASE (F = NULL AND G < sysdate)="" then="" sysdate="" -="" g="" else="" when="" case="" (f=""> <> NULL AND F > G) THEN F - G END OTHERWISE NULL

    This is not the right format for a CASE statement. See http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/controlstructures.htm#i2866.

    In addition, you cannot validly compare NULL values, you can check if a ' IS NULL.

  • inserting data into a temporary table

    I want to do something like session and I decided to use the temporary table. But when I try to insert data that has no past. This is my trigger when-pressed key code:


    declare

    total_col number (18.0);
    varchar (100) of the author.
    title varchar (200);
    price number (18.0);


    Start
    Select BOOK_AUTHOR, BOOK_TITLE, BOOK_PRICE by author, title, price from BOOKS where BOOK_ID =: BOOKS. BOOK_ID;
    insert into orders_tmp (author, title, price) values (author, title, price);
    commit;

    Select total in total_col total_amount where t_id = (select max (t_id) total_amount);
    : SUB_CATEGORY. AMOUNT: = total_col;
    end;

    the first line of the selected data of the block, 2nd insert into the temporary table. 4th line selected the last column in a temporary table and dispalying in etiquette. When the trigger is activated, I have an ORA-01403 error.
    Help, please.

    Edited by: 863470 2011-09-06 06:50

    I decided to use the temporary table

    Can you show how you created your temporary table (ie., show us your DML Table statement)? Without knowing how you have set your temporary table, we can really offer you suggestions. ;)

    declare
    

    total_col number (18.0);
    varchar (100) of the author.
    title varchar (200);
    price number (18.0);
    Start
    Select BOOK_AUTHOR, BOOK_TITLE, BOOK_PRICE by author, title, price from BOOKS where BOOK_ID =: BOOKS. BOOK_ID;
    insert into orders_tmp (author, title, price) values (author, title, price);
    commit;

    Select total in total_col total_amount where t_id = (select max (t_id) total_amount);
    : SUB_CATEGORY. AMOUNT: = total_col;
    end;

    This is more work than it should be. A much simpler and more elegant method is:

    /* Sample When-Button-Pressed trigger */
    BEGIN
       INSERT INTO orders_tmp (author, title, price)
       SELECT BOOK_AUTHOR, BOOK_TITLE, BOOK_PRICE
         FROM BOOKS
        WHERE BOOK_ID = :BOOKS.BOOK_ID;
    
       ... Rest of your code here...
    END;
    

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • ADF progress indicator to insert the data into the file table.

    I have a requirement where the progress bar should indicate the percentage of completion to insert the data into the tables of database files in a given folder path. I found an article that explains how to get the progress indicator when downloading a file in
    http://www.gebs.ro/blog/Oracle/Oracle-ADF-progress-indicator-in-Fusion-Middleware-11g/. I believe that I must first get the total number of files in the folder and then begin to compare with the number of files that are inserted into the table similar to what is done by downloading (getting the file size and download size), but I don't know how to do this. Can anyone help?

    May be that this example allows you to

    * 042.     Dynamically change the color of progress bar based on its current value *.

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html

  • LOAD CSV DATA INTO A NEW TABLE

    I have a basic csv file-12 columns, 247 lines I tried to import or paste it into a new table and with each try, not all records get downloaded in the new table. Using the "Load Data" tool, I tried text data load, load the worksheet data, by import .csv and copy/paste. I put the records in the order PK ID of the table, I added dummy entries in all fields are null (that is, I added the word "None" for empty fields). But nothing works. I get about half of existing records.

    Why?

    The Max Size for VARCHAR2 is 4000. If you have a text which is longer, you must type clob column.

    If you wann download the entire file you need of a blob column you need to implement a uploadscript like this: http://www.dba-oracle.com/t_easy_html_db_file_browse_item.htm

  • How to bind xml or other data to a mobile list in Dreamweaver?

    I'm trying to understand what should be a simple thing in Dreamweaver.

    It is in the use of jquery mobile, how do I join a xml file for items in list of attributes?

    If this is not possible, someone would be able to tell me or direct me to a way to manage data in Dreamweaver for mobile applications. I'm on top, trying to understand all the technology. It seems that HTML5, xml, sqlite, json and all the possibilities. I have a simple database of items maybe 300: a picture and a description. The data will reside and be read on the mobile application client-side.

    I want to read items in a list. Then call to the top of the individual items on a new 'page' based on the selection of the user of the list item. It's so easy to Dashcode Mac. Surely, I must be missing something in Dreamweaver 5.5.

    TIA to anyone who is trying to point me in the right direction.

    Have a look here http://books.google.com.au/books?id=kJ5ZWFZtWFgC&pg=PA113&lpg=PA113&dq=spry+datasets+and+j query + mobile & source = bl & to ots = l8vMEvoRZn & to sig = rZYgQGSdsxX64jCQPnFFqJdMwFg & hl = en & to her = X & ei = xpwPT8 GRIumiiAeztrQK & to sqi = 2 & ved = 0CF4Q6AEwBw #v = onepage & to q = % 20datasets % 20and % 20jquery % 20mobile spry & f = false (apologies for the length of the URL) and here http://foundationphp.com/dwmobile/

    GRAMPS

  • How to retrieve the long column of news from the BBC, which disappeared in FF was last updated?

    Before the last update and on FF is first opened, there was a BBC News Items labeled tab just below the address bar. Clicking on this tab opens a long column of news. By clicking on one of them opened a web page describing this item. After the last update (38.0.5) this tab is gone. How can I get that back?

    Hi, was it a bookmark in the bookmarks may bar? If missing the bookmarks bar, right-click in the bar of tabs - but not on a tab and tick/check bookmarks toolbar.

    It may also be a lack of subscribe (RSS) button - see orders customize Firefox, buttons, and toolbars.

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • How to generate XML from database data using a procedure?

    Hello

    I want to generate output as xml to database tables using a procedure. Can anyone suggest me on how to do this?

    Thanks for your time.

    Reel for the XML script

Maybe you are looking for

  • Satellite M70-151 - not possible to install new HDD

    Hello I have a problem with my Satellite M70-151. bunch of old hard drive (100 GB Hitachi) reached the Windows XP screen then just ends with a blue screen a turn off laptop, immediately. I had to restore my data with an application file-rescue of ano

  • Safari address bar without

    Hi all This morning web Safari address bar stopped working without reason. I am using El Capitan for a couple of months now and I have not installed anything new in a few days, so I can't associate this problem with any specific application. Here are

  • activate an IPad opportunity

    I recently left my IPad on a plan and have no chance with lost American, I bought an IPad on EBay.  When I get this what steps should I take to make this "mine?"  I'll be able to put in my own access code?  I'll be able to register this with Apple?

  • Laptop HP2000, network controller and PCI error

    Hi, I am unable to use the WiFi or Bluetooth in my notebook, I think because the controller pci device and network all have two peripheral error mananger connect. I am using windows 7 32 bitHardware ID Network controllerPCI\VEN_168C & DEV_0036 & SUBS

  • Change of color of the page in a tab control programmatically

    AFAIK, you can manually change the colors of the individual pages in a tab control (if you have the property allow several colors set to True), but you can't do it programmatically. For my particular application, there is only a single page color, I