Extraction of data from XMLType field

Sorry, I am not sure XMLQuery, this is probably a simple question.  I am trying to extract data in a tabular form of an XMLTYPE field.  I will use the following example to illustrate my question:

WITH a (too)

Select xmltype (')

< bugStatus >

< status >

< > 111 bugCode < / bugCode >

< number of bug = "12345" description = "Low severity bug" / >

< / status >

< status >

< > 222 bugCode < / bugCode >

< number of bug = "67890" description = "high severity bug" / >

< / status >

< / bugStatus >

XMLDATA') of double)

SELECT x.*

A xmltable (' bugStatus/status

by the way the columns in a.xmldata

status_code number path "bugCode.

) x ;

Run this code extracts block the "bugCode' fields successfully.  But I would also to extract the 'bug number' and 'description' fields.  Ideally in the independent columns.  But even if only as a single line 'number of bug =... description =... ". "I could still do it analyze with SQL.

Can someone tell me please in the sense of how I can also extract additional data?

Thank you!

Attributes are processed by '@' so in your example (thank you), you can solve it through

WITH a (too)

Select xmltype (')

111

222

XMLDATA') of double)

SELECT x.*

A xmltable (' bugStatus/status

PASSAGE a.xmldata

COLUMNS

ROW_NUMBER for ordinalite,

path number bugCode "bugCode."

bugNumber path number "bug/@number."

path of varchar2 (4000) bugDescription 'bug/@description '.

) x ;

ROW_NUMBER BUGCODE BUGNUMBER BUGDESCRIPTION

---------- ---------- ---------- --------------------------------------------------

1 111 12345 low severity bug

2 222 67890 high severity bug

Tags: Oracle Development

Similar Questions

  • extract data from XMLType using vbscript on OleDB?

    Hello.

    We have a problem where the XMLType column data to get in 11.2.0.1 on Windows x 64 worked very well, but we have moved to 11.2.0.3 Patch 21 and the column type changed to binary storage default, and we started to do read errors when the data was greater than 32 k (or so it seems).

    I opened a SR, and Oracle support sent me a VB script to test playback of the table on OleDB.  However, their script doesn't seem to work as announced, so after a lot of gooling, came to us with the following to read a column of xmltype - not the same table, just to test that the vbscript works:

    REM need to re-register the dll OLEDB as there is a problem with the oracle client and the dll registration

    REM start following an administrator command prompt

    REM regsvr32.exe c:\Users\finite9\oracle\product\11.2.0\client_2\bin\oraoledb11.dll

    the con value = createobject ("adodb.connection")

    con. Open "provider = oraoledb.oracle; user id = finite9; password = password1; data source = TSTDB ".

    Set rs = createobject ("adodb.recordset")

    RS. Open 'select SW_REPLY changedate', con

    While not on the place. EXPRESSIONS OF FOLKLORE

    MsgBox rs. Fields ("ChangeDate"). Value

    RS. MoveNext

    Wend

    RS. Close

    Set rs = nothing

    con. Close

    the value con = nothing

    This works perfectly and displays 12 rows in this column in a vbscript dialog box, but I am not able to do to extract the XMLType column clob data.  I try with for example. RS. Open 'select REPLYDATA.getclobval () from SW_REPLY', stupid but just get errors.

    Is it possible to extract data from XMLType on OleDB with vbscript?  It cannot be OleDB itself which poses problem, because it has worked in our application and 11.2.0.1 although with < 32 k of data.  But it would be nice to have a working test case while we were able to test out our app.  If it is with vbscript or c# is irrelevant.

    ignore the message, it is possible.  Support of Oracle gave me this:

    the con value = createobject ("adodb.connection")

    con. Open "provider = oraoledb.oracle; user id = finite9; password = password1; data source = DEVTST ".

    Set rs = createobject ("adodb.recordset")

    RS. Open "select t.REPLYDATA.getclobval () as xmltestdata OF SW_REPLY t", con

    While not on the place. EXPRESSIONS OF FOLKLORE

    MsgBox rs. Fields ("xmltestdata"). Value

    RS. MoveNext

    Wend

    RS. Close

    Set rs = nothing

    con. Close

    the value con = nothing

    but there is a problem when xmldata exceeds a certain size.  small starters work well if.

  • DV7 - 7333cl: how to extract usable data from a bad drive using 22 pins adapter usb to SATA on the new HD

    Greetings HP Forum,

    Recently, I replaced a bad hard drive on my laptop. I need now step by step procedure to extract usable data from the wrong drive using 22 pins adapter usb to SATA on the new HD.

    NOTE: I can't not all data that especially if some of the software downloaded on the replaced disk can be altered. Should I first download Internet Antivirus to protect my new hard drive? I'm not an expert, or even close to this when you work on the back of the laptop, so I'll have to step by step how to download and to partition the data recoverable and software, etc..

    Thanks in advance for your help... I greatly appreciate it!

    See you soon!

    Wes

    It is not complex. Attach the drive to the adapter and connect it to any other computer with good antivirus and antispyware installed. I use Malwarebytes and Avast. When you connect the adapter with the drive connected to the usb port, the drive will appear and it will be assigned a letter maybe E:\ or F:\ or something else. Immediately, he analyzes with the antivirus and anti-spyware. Quarantine or delete any virus or malware it finds. Then, it's just a matter of navigate the disk and copy and paste the contents of the host computer in a directory for this purpose. Obviously, you can copy from documents word, photos, music files, but you cannot copy the applications like Microsoft Word, iTunes. Photoshop.  You may need to take ownership of the files on the old hard drive, but Windows will guide you through this. Don't know what else I can answer.

  • Extracting the data from QVariantMap

    I have the following data :

    QVariant (QVariantMap, QMap ((' data', QVariant (QVariantMap, QMap ((' current_condition', QVariant (QVariantList, ((QVariantMap, QMap... QVariant QVariant (QVariantMap, QMap ((' weather', QVariant (QVariantList, ((QVariantMap, QMap... QVariant QVariant (QVariantMap, QMap ((' weather_desc', QVariant (QVariantList, ((QVariantMap, QMap... QVariant

    m_model-> insert(data.value() .value ("data") .toMap ().value("weather").toList () .at (0) .toMap ());

    Using the above line, I am able to extract relevant data from "current_condition and"weather".

    What should I add to the line above to also extract data from 'weather_desc '?

    Any help would be appreciated. Thank you.

    Thank you! It is much easier to read when formatted, it's the first thing I did.

    { "data":
      {
        "current_condition":
        [
          {
            "cloudcover": "0",
            "humidity": "18",
            "observation_time": "02:36 AM",
            "precipMM": "0.0",
            "pressure": "1007",
            "temp_C": "39",
            "temp_F": "102",
            "visibility": "10",
            "weatherCode": "113",
            "weatherDesc": [ {"value": "Sunny" } ],
            "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png" } ],
            "winddir16Point": "N",
            "winddirDegree": "10",
            "windspeedKmph": "46",
            "windspeedMiles": "29"
          }
        ],
        "request":
        [
          {
            "query": "Melbourne, Australia",
            "type": "City"
          }
        ],
        "weather":
        [
          {
            "date": "2013-01-04",
            "precipMM": "0.0",
            "tempMaxC": "37",
            "tempMaxF": "98",
            "tempMinC": "19",
            "tempMinF": "66",
            "weatherCode": "113",
            "weatherDesc": [ {"value": "Sunny" } ],
            "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png" } ],
            "winddir16Point": "N",
            "winddirDegree": "3",
            "winddirection": "N",
            "windspeedKmph": "21",
            "windspeedMiles": "13"
          }
        ]
      }
    }
    

    To access weatherDesc in usage by time:

    Data.value.value("data").toMap ().value("weather").toList () .at (0) .toMap ().value("weatherDesc").toList () .at (0) .toMap .value ("value") ())

    This will return "Sunny."

    For readability, I suggest if this string to:

    QMap  dataMap = data.value().value("data").toMap();
    
    QList weatherList = dataMap..value("weather").toList();
    
    QVariant firstWeatherEntry = weatherList.at(0);
    
    QMap weatherEntryMap = firstWeatherEntry.toMap();
    
    QList weatherDescList =
    weatherEntryMap.value("weatherDesc").toList();
    
    QVariant firstWeatherDescEntry = weatherDescList.at(0);
    
    QMap weatherDescEntryMap = firstWeatherDescEntry.toMap();
    
    QString value = weatherDescEntryMap.value("value").toString(); // "Sunny"
    

    Also, you can check intermediate outcomes at each stage by calling

    qDebug()< weatherlist="">< "\n";="" and="" so="">

  • Hi, after all stages of extraction of data from oracle to oracle during the execution of command "start extract ext1" his error giving the Manager does not work, can you please help me. Thank you

    Hi, after all stages of extraction of data from oracle to oracle during the execution of command "start extract ext1" his error giving this handler does not run both source and target, can you please help me. Thank you

    Hello

    The setting should be as below, and not only the port number should be...

    PORT 7809

    Kind regards

    Veera

  • How to handle data from multiple fields

    Hi all

    My data are:
    FldName           FldTypeCode          Text
    Sandya            02                         nothing
    Raj                 01                         12/Oct/2008
    Lokesh            03                          12546
    Harish             04                          12565.35
    King                01                          12/Nov/2007
    Cobra              02                          texttype
    In the user interface, I give all the data of three fields with refcursor. now in HQ DB happening all the values to be updated at the same time.
    (Q) now my question is how to update all values.
    For example: create procedure procdname (ip_allvalues in typerecord)
    is
    Start
    -statements;
    end;

    the procedure input parameter above can manage all data from three fields as they pass.
    (1) if the parameter handle, should what kind I create?
    (2) I need how can I update multiple records at once?

    Please can any body...
    Thanks in advance...

    sanjuv wrote:
    But when it goes to day it must pass all records at once (lines have almost 55) at a time not possible to update for all records but also not good to create input parameters for the procedure 55. If it has past a table how can I handle this situation.

    Why do you need to update all records at once? And what is blocking you implements a loop on the user interface which, for each changed row, submits an update of the DB? Note that you will get no improvement with a bulk operation when entering comes from a user interface.

    Alessandro Bye

  • Apex. Ajax.CLOB - extraction of data from a clob field

    I have an application that uses a table that stores xml data, and the field of the table that stores the data is a clob. I used the example of Carl Backstrom to build what I have so far, (the blessing of God on her family). Here is the script I use to store the data of an HTML editor in the database:


    function clob_set (request) {}
    var oEditor = FCKeditorAPI.GetInstance ('P59_CONTENT');
    var clob_ob = new apex.ajax.clob)
    function() {}
    var p.readyState = RS
    If (rs == 1 |) RS == 2 | RS == 3) {}
    $x_Show ('AjaxLoading');
    } else if(rs == 4) {}
    $x_Hide ('AjaxLoading');
    $s ('P59_CONT', p.responseText);
    doSubmit (request)
    } else {return false ;}
    }
    );

    $x('P59_CONT').value = oEditor.GetHTML ();
    oEditor.SetHTML (»);

    If (! $v_IsEmpty ('P59_CONT')) {clob_ob._SET ($v ('P59_CONT'));}
    }

    Present it calls a process that inserts the data in the field clob001 of the CLOB_CONTENT collection in my table.

    How can I get the data of the table again to present in the HTML editor? Each option I use me trouble with the limitation of length k 32 surviving more in the Apex. What would be the best way to answer that?

    Hi Yonkovator,

    I've also been struggeling with this problem for some time. Like you, I also used the example of Carl (my greatest condolences to his family and friends).
    Today, I finally managed to make it work. Now I can save the Clob to a HTML Editor field and load the Clob data (from the database) into the HTML editor field.

    * First, I created a region of HTML in which I placed my order on the day of the HTML editor.
    * Then, I created a process (On Load - after header) that retrieves the Clob data from the database and puts it inside the collection
    CLOB_COLLECTION. (Below is the code I used to recover the data).

    declare
    L_Name opcd_entity.name%type;
    l_entitytype opcd_entity.entitytype_id%type;
    l_clob CLOB: = empty_clob();
    Start
    apex_collection.create_or_truncate_collection (p_collection_name-online 'CLOB_CONTENT');
    DBMS_LOB.CREATETEMPORARY (l_clob, false, dbms_lob. SESSION);

    Select name
    entitytype_id
    general_text
    in l_name
    l_entitytype
    l_clob
    of opcd_entity
    where id =: P9_ID;

    : P9_NAME: = l_name;
    : P9_ENTITYTYPE: = l_entitytype;

    apex_collection.add_member (p_collection_name-online 'CLOB_CONTENT'
    p_clob001-online l_clob
    );
    end;

    * I expanded function clob_get of Carl with var oEditor = FCKeditorAPI.GetInstance ('P9_CLOB');
    (In your case, P9_CLOB would be P59_CONT).

    function clob_get() {}
    var oEditor = FCKeditorAPI.GetInstance ('P9_CLOB');
    var clob_ob = new apex.ajax.clob)
    function() {}
    var p.readyState = RS
    If (rs == 1 |) RS == 2 | RS == 3) {}
    $x_Show ('AjaxLoading');
    } else if(rs == 4) {}
    $s ('P9_CLOB', p.responseText);
    $x_Hide ('AjaxLoading');
    } else {return false ;}
    }
    );
    clob_ob._GET ();
    }

    * That I added an addLoadEvent in the foot of the region in the region that holds my agenda of the HTML editor.

    This way the clob data are updated automatically the HTML Editor element when I load the page (at least in my app ;-)).

    I hope this will help you to tackle the problem.

    With respect,
    Ramon van der Weiden

  • Extraction of data from two tables without discounting

    Hi friends,

    I have a problem I want to extract data from two tables without discount in the text field when I will enter any value in a text field, then the value of corressponding must come to textfield corressponding.

    for example. There are two table A and B.
    Table A has Colunm

    S_ID number;
    C_ID Varchar2 (30);
    VARCHAR2 (4) s;

    Second table B Colunm name

    S_ID number;
    What varchar (30);
    L_Name varchar (20);

    When I enter in a text field then the c_id 101 s_id, dry, first_name and last_name should come to corressponding text without refresh fields.

    How can I do that.

    Thank you
    Maury

    You can use Ajax and there are tons of good examples out there for this purpose;
    For example [http://apex.oracle.com/pls/otn/f?p=31517:236:1876567353842241]

  • Extract the data from the ReadyNAS Duo 3 to disk?

    Hello

    I have a ReadyNAS Duo chassis crashed with two drives of 3 TB in it. Both discs seem to work very well.

    How can I do to retrieve the data from disks of theses? they were in a RAID 1 configuration, so I guess I just need to extract one of the disks. Does it matter which drive is it?

    I started to connect one of the disks to an installation of Ubuntu and I can find from the disc with respect to the available partitions, but I get no info on the file system used, only that it is flagged as RAID.

    Because I don't want ot destroy all the data I was very careful when working with the partitioning tool. So far, I've installed and looked parted, gparted, gdisk and a few others.

    Since I'm really new to Linux, I need more detailed assistance with indicators to be used to access the drive.

    Any input is highly appreciated.

    Christoffer

    Look at this: http://kb.netgear.com/app/answers/detail/a_id/29961?utm_source=community&utm_medium=announcement&utm...

  • How to get data from text fields in double.

    Here is the sample code that I had done with,

    var textf:textField;
    for(var i:int = 0;i<=7;i++)
    {
       textf = new textField;
       this.addChild(textf);
       textf.name = "textdata"+i;   textf.x = 500;  textf.y = 50+50*i ; 
    }
    nextbtn:button = new button();this.addChild(nextbtn)nextbtn.x = 400;nextbtn.y = 500;nextbtn.addEventListener(MouseEvent.CLICK,getdata);
    function getdata(e:MouseEvent):void
    {
       trace(textf.text)
    }
    

    From the code above will add six textfields, but in the next button function, it has to be traced back all the data in the fields of text I typed, but the code shown next button only the last textfield data are drawn, all data can be recovered, how do I get the data of all the textfields remaining...

    Please help me,

    Thanks in advance

    You can also watch the event 'target' to determine the object that generated the event.

  • Extracting the data from relational tables in 11.1.2.1

    I want to extract the following data sets from relational tables
    1 attribute and his partner basic member
    2 Smartlist value of an account

    Have a code to extract such data? It will be useful in pointing to the correct table names.

    Thank you

    You will find the table schemas in the [documentation for EPMA | http://www.oracle.com/technetwork/middleware/bi-foundation/epm-data-models-11121-354684.zip]. If this does not work, there are other options to export hierarchies in text files. You can use the lifecycle management or the [EPMA line Generator | http://docs.oracle.com/cd/E17236_01/epm.1112/epma_file_gen_user/launch.html].

    Kyle Goodfriend
    http://www.in2hyperion.com

    Please make sure that you assign your post as answered when an appropriate response is provided (or useful when it takes place) as well as other benefits.

  • Extraction of data from SQL Server 2000.

    Salvation Group

    We have a database of Oracle 9i r2 on AIX.

    Is required to extract data from a SQL Server 2000 Database under Microsoft Windows 2003, through SQL sentences.

    Is this possible?

    If yes how?

    Thanks in advance.

    user12215372 wrote:
    Salvation Group

    We have a database of Oracle 9i r2 on AIX.

    Is required to extract data from a SQL Server 2000 Database under Microsoft Windows 2003, through SQL sentences.

    http://www.Oracle.com/pls/db112/search?remark=quick_search&Word=transparent+gateway

  • data from one field to another field of text on the next page

    Hi all

    Hi I have a form that contains data from the data binding, the thing is the data maps to a certain text field and if this field is filled in, it should continue on the text field located on the page immediately after this one. the reason for using the text field instead of subform and make repeating is that the customer does not change the position and the structure of other fields as a result of this area, they are OK with the amount spilled in the following text field.

    is there a script for the same disease in Java script or form Calc.

    Thanks in advance.

    de1209

    It is not as simple as it sounds. You won't be able to split the field during bonding time. The entire string must go on the ground and only after that he completed the biinding can change us around. A colleague of mine did for an interactive field and it's a very complicated code. Here is a link to his blog entry that describes what she did:

    http://blogs.Adobe.com/lcdesigner/2008/07/an_example_of_splitting_text_a.html

    But this is only part of the problem... once separate you the information in two areas that you need to recombine into one field that the data submitted can represent correctly again. If you reverse the process in a preparatory stage.

    Make sense?

    Paul

  • Extraction of data from MS SQL .bak file

    Hi all

    I received a MS SQL .bak file and need to extract the data into it, what should I do to achieve this?

    In addition, what is a bak file? It's a backup for a database file? I remember that I read somewhere that backup database has several different method (for example, the differential backup, the full backup), which will affect the restoration?

    Thank you

    Lee

    Hi Lee

    Your best resource for information is the Forum dedicated to suppoeting SQL.

    Category of the SQL Server:

    http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer

    Concerning

  • extract data from blob field containing xml data big

    I'm working on Oracle 11 g 2, 11.0.2.0.3. UNIX database server.

    my oracle instance receive large xml data service web ftp, I put this file as blob in a table called TBL_ALERT_XML (ID_ALERT NUMBER, DATE of the TIMESTAMP_ALERT, ALERT_XML BLOB).

    My goal is to get data of BLOB content e file put in one or more other tables.

    I try with the opening of a cursor on

    SELECT XMLTYPE (UTL_RAW.cast_to_varchar2 (ALERT_XML)). Extract (' alerts/points/point / / Text () ') threads

    OF TBL_ALERT_XML

    without any filter on ID_ALERT.

    But I get the error:

    ORA-22835: buffer too small for to CHAR CLOB or BLOB to RAW conversion



    Please help me, thank you very much

    Because the web service is deployed in python and my co worker is not able to call a stored procedure with the parameter xmltype, but only with the setting of the BLOB.

    If you can't get around it, so be it. All the less, using CLOB would be better.

    However, which prevents you to convert BLOB XMLType entry within the stored procedure and store it in an XMLType column.

    To do this, simply use the XMLType of BLOB.

    create table tbl_alert_xml)

    number of id_alert

    date of timestamp_alert

    alert_xml xmltype

    );

    insert into tbl_alert_xml

    values)

    1

    sysdate

    xmltype (p_blob

    , nls_charset_id ('AL32UTF8') - put the encoding of the file here

    )

    );

    Then, you will be able to execute queries optimized using XMLTABLE.

Maybe you are looking for

  • Amazon's error message plugins required Web site

    Loading site Amazon UK, error message received this additional plugins required to display all the media on the page. Java and Flash have been updated and all the other plugins updated but the problem is not resolved. When I click on install plugins,

  • Need drivers XP for Equium A100-338

    Hello People that you can help me, I have an Equium A100-338 and I changed from vista to xp.I managed to find display and drivers sound card, so I need information on other controllers: ethernet, network, mass storage, bus sm.Thanks for any help.

  • Import data from PPT in LabVIEW

    Is there a way I can get the information on the forms present in a specific slide in a powerpoint presentation in LabVIEW. I was able to get the account information for all forms of a slide but nothing more. For example, I would need the dimmension o

  • How flip you a photo for printing on transfer papar

    I want to print a photo from my photo gallery on transfer paper to be applied to a piece of cloth.  I don't see where I do reverse - just say I want to print on transfer paper.

  • my laptop won't let me put a password, he said: error 0 x 0

    He said: error 0 x 0