How to extract data in a given format.

Hello

Can someone help me get the data in the given format. Any help will be much appreciated.


entity instance id_1 Type_1 Val

ert_enquiry SAP_096_0980_K or_Cost currency 128,0
ert_enquiry SAP_096_0980_K ort_cur_sum currency 145.0
ert_enquiry SAP_096_0980_K ort_cur_on currency 125.0
ert_enquiry_1 AAP_011_0865_G or_Cost currency 108.0
ert_enquiry_1 AAP_011_0865_G ort_cur_sum currency 126,0
_1 ert_enquiry AAP_011_0865_G ort_cur_on currency 115,0


Database 11g ver 11.2.0.2.0


with t as)
Select xmltype)
' < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/".
xmlns:i24n = "http://www.w3.org/2005/09/ws-i24n".
xmlns:Typ = "http://oracle.com/determinations/server/10.3/rulebase/assess/types" >
< SOAP - ENV:Header >
< i24n:international >
en_US < i24n: local > < / i24n: local >
< i24n:tz > GMT-0700 < / i24n:tz >
< / i24n:international >
< / SOAP - ENV:Header >
< SOAP - ENV:Body >
< type: assessment / response >
< type: global instance >
< typ:entity id = "ert_enquiry" >
< typ:instance id = "SAP_096_0980_K" >
< typ:attribute id = "or_Cost" type = "currency" deducted = "true" >
< typ:number - val > 128,0 < / typ:number - val >
< / typ:attribute >
< typ:attribute id = "ort_cur_sum" type = "currency" deducted = "true" >
< typ:number - val > 145.0 < / typ:number - val >
< / typ:attribute >
< typ:attribute id = "ort_cur_on" type = "currency" deducted = "true" >
< typ:number - val > 125.0 < / typ:number - val >
< / typ:attribute >
< / typ:instance >
< / typ:entity >
< typ:entity id = "ert_enquiry_1" >
< typ:instance id = "AAP_011_0865_G" >
< typ:attribute id = "or_Cost" type = "currency" deducted = "true" >
< typ:number - val > 108.0 < / typ:number - val >
< / typ:attribute >
< typ:attribute id = "ort_cur_sum" type = "currency" deducted = "true" >
< typ:number - val > 126,0 < / typ:number - val >
< / typ:attribute >
< typ:attribute id = "ort_cur_on" type = "currency" deducted = "true" >
< typ:number - val > 115,0 < / typ:number - val >
< / typ:attribute >
< / typ:instance >
< / typ:entity >
< / typ: global instance >
< / typ: assess / answer >
< / SOAP - ENV:Body >
(< / SOAP - ENV:Envelope > ') col
the double)
Select x.*
t,.
XMLTable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
, ' SOAP - ENV:Envelope / SOAP - ENV:Body / typ: assess-response/typ: global instance / descendant::typ:attribute'
in passing t.col
columns
path of varchar2 (100) of ID_1 "@id."
path of varchar2 (100) TYPE_1 "@type."
path of varchar2 (100) Val '.'
) x
;


Thank you

Mhand
45  --
 46  select  b.entity, c.instance, d.*
 47    from t,
 48         xmltable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' as "SOAP-ENV",
 49                                'http://oracle.com/determinations/server/10.3/rulebase/assess/types' as "typ"),
 50                  'SOAP-ENV:Envelope/SOAP-ENV:Body/typ:assess-response/typ:global-instance/typ:entity'
 51                  passing t.col
 52                  columns entity varchar2(20) path '@id',
 53                          res_tmp2 xmltype path 'typ:instance') b
 54        ,xmltable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV",
 55                                'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ"),
 56                  'typ:instance'
 57                   passing b.res_tmp2
 58                   columns instance varchar2(20) path '@id',
 59                           res_tmp3 xmltype path 'typ:attribute') c
 60        ,xmltable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV",
 61                                'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ"),
 62                  'typ:attribute'
 63                   passing c.res_tmp3
 64                   columns id_1 varchar2(20) path '@id',
 65                           type_1 varchar2(20) path '@type',
 66                           val varchar2(20) path '.'
 67                  ) d
 68  /

ENTITY                                                                           INSTANCE                                                                         ID_1                                                                             TYPE_1                                                                           VAL
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
ert_enquiry                                                                      SAP_096_0980_K                                                                   or_Cost                                                                          currency                                                                         128.0
ert_enquiry                                                                      SAP_096_0980_K                                                                   ort_cur_sum                                                                      currency                                                                         145.0
ert_enquiry                                                                      SAP_096_0980_K                                                                   ort_cur_on                                                                       currency                                                                         125.0
ert_enquiry_1                                                                    AAP_011_0865_G                                                                   or_Cost                                                                          currency                                                                         108.0
ert_enquiry_1                                                                    AAP_011_0865_G                                                                   ort_cur_sum                                                                      currency                                                                         126.0
ert_enquiry_1                                                                    AAP_011_0865_G                                                                   ort_cur_on                                                                       currency                                                                         115.0

6 rows selected

SQL> 

Tags: Oracle Development

Similar Questions

  • How to extract data using bluetooth other device...

    Hi all

    First, I describe my problem:

    I want an application that extract the xml data in ECG device using bluetooth after accessing this data make some calculation and send it to the server... I am able to serach all the device compatible bluetooth after that, I am also able to connect from the particular device... (Now I use bluetooth Simple device as phone, pc or anything which is Bluetooth)

    Now the problem is... After connection of the device, I want to go get a (for example an image or text document.) file of the device connected using my camera...

    can anyone know how to extract data or file to another device that is currently associated with my camera... using BlackBerry device...

    Please help me to overcome this problem...

    Currently, I am working with Blackberry.6

    As suggested, I would recommend you try the samples provided.

  • How to extract data from a signed pdf that was sent to me.

    I can extract data from a PDF file that is not signed, but how to extract data from a signed PDF? Exporting data option does not work once it is signed. Specifically, I want to combine the data into a csv file, but a PDF signed does not to me.

    Hi evanb92625060,

    It is not possible to extract (using Acrobat |) Collection and management of the PDF to form data) data from a signed PDF form is that it locks all fields in the form.

    Kind regards
    Nicos

  • How to extract data from SQL server in the FDM

    Hi Experts

    How to extract data from a SQL server HFM to another SQL Server using scripts for integration in FDQM?

    concerning

    Dev

    Could you clarify why you want to do this?

    If you try to synchronize two databases (apps) to have a backup or something running in a development environment, I suggest configuring replication between two databases. It would be much more effective to do it at the SQL Server level through the application of FDM, IMHO.

    Charles

  • How to extract data using substring &amp; Instring

    Hello

    I have data like

    a_76488b_2780c

    a_76488b_2780c_

    a_76488b_c2780

    a_76488b_c2780

    a_31487b_5542

    a_76488b_2780

    I want to extract data such as the last 4 digits digital only

    2780

    2780

    2780

    2780

    5542

    2780

    Without regexp? It depends on your comments... If you know a definitive character set you want to replace, and then you can go for:

    (strictly dependent on your entry in the question)

    SELECT TRANSLATE)

    SUBSTR (RTRIM (str, '_'), INSTR (RTRIM (str, '_'), '_',-1) + 1);

    '~c_',' ')

    Str

    T;

    See you soon,.

    Manik.

  • How to extract data from SAP and COBOL using ODI

    Hi people,

    Can you please let me know the procedures in ODI to extract data from SAP and COBOL?

    Thank you all for the help.

    Hello

    You can download the Patch 8571830 to Oracle metalink.

    It has a new technology 'SAP ABAP' and KMs to extract and load data-
    RKM SAP ERP and SAP to Oracle ERP LKM.

    Thank you

  • How to extract data from waveform

    I have prepared a VI for acquisition and analysis. I have data from NI 9203 manuplate (power source). I have to use a lot of channels and more than 1 sample of a channel so Daqmx read vi out of waveform module and it is not a choice for table 1 d. How can I this form to scale data and display 2 diffferent scale given in a graphic waveform?

    The DAQmx Read returns an array of waveforms.  Each waveform is t0, dt, Y components and optional attributes.  See the palette of waveform for tools to extract the components and build waveforms.

    To make your scaling that you do these things:

    1. Select the waveform you want to scale by using the Index table or index of waveform Array.vi.

    2. download the component Y of the selected waveform.

    3. resize it if Y' = m * Y = b, where is the original painting and the Y' is the matrix to scale.  You can use the standard digital functions for * and + because they work for arrays and scalars.

    4 build a new waveform using Y'.

    Lynn

  • How to extract the Image to XML Format?

    Hello

    I use Oracle as our database.
    In the Employee Table, it the column of Type Blob.


    I extract all the data (such as name, Sal, age, Dept) of the Employee Table in XML format.

    Now, there's also a column Blob added, please tell me how can I extract this Image Format as XML?

    Thank you.

    You can use base 64 format.

  • How to extract data from an arbitrary xml file and export it to a CSV friendly?

    Hallo,
    I am facing big problems in the use of XML files. I have a
    application that generates XML files with clusters containing arrays
    and scalars as in the example pasted below. My task is to
    Read it and export the data into a CSV document readable by a human.
    Since I do not know the actual content of the cluster, I need some sort
    Smart VI through the XML looking for berries
    and other data structures for export properly in the CSV file
    format (columns with headers).
    Thank you



    3


    6


    0



    1



    2



    3



    4



    5




    3.14159265358979



    Ciao

    Rather than to get the

    node, you can just go directly to the node since ' one that really interests you. Basically what it means to determine the elements of table how much you have, and it depends on if you have 1 or 2 knots . The rest is just of the child nodes and the next siblings. See attachment as a starting point. The attached XML file is a table 2D (change the .xml extension).

    Notes on the example:

    • I did not close properly references, so it's something you need to do.
    • It is limited to tables 1 d or 2D.
    • I suggest using a control path of the file to specify the input XML file and path of the file/folder control to specify the location of the output file.

  • How to extract data from old profile profile

    I have the raw profile data, but the migration of the entire folder on is not option.
    All I need at the moment is the:

    • history/bookmarks
    • session tabs
    • the list of addons
    • the data of the addon.

    How can I get those?

    It's a little complicated. This add-on can do most of the work for you.

    These modules can be a great help for the backup and restoration of Firefox

    FEBE (Firefox environment Backup Extension) {web link}
    FEBE you can quickly and easily backup your
    Extensions Firefox, history, passwords and more.
    Indeed, it is more than just backup - it will actually rebuild
    your saved individually into installable as files.
    It will also make backup of the files you choose.

    OPIE {web link}
    Import/export extension preferences

  • How to extract data (contacts, messages, photos) to backup iPhone without a camera?

    Hello, my iPhone lost all important data, including contacts, messages and photos disappeared, but I remember that I backed up my iPhone to iTunes, I need to restore the data, messages, contacts, photos of backup iTunes on my computer, how can I do? There the iPhone backup extractor app that can do? Any suggestion?

    Connect the iPhone to the computer with iTunes with the cable of lightning that came with the new phone and follow the prompt to restore from a backup.

  • How to extract data from cluster of component-level?

    I use the harmonic Analyzer function to read the cluster of component-level, which cotain for channel 0 and 1 data

    But having problem with playing on the basic component for each channel (part of the table 1). Pleas help.

    Thank you

    Yes! What I need is a function of the index before using of unbundling by name to extract the desired data. THX

  • How to extract data from digital 1 d or 2D waveforms in a table or excel file?

    Hi all

    My DAQ gives me data in the form of a table 1 d or 2D-waverform digital time.

    How to export the data in an excel file or copy it into a table?

    Hi Prasanth,

    Some options come to mind:

    -pass the DAQmxRead to give you fair DBL tables instead of waveforms

    -use a conversion like this:

    -use functions of PDM, they accept waveforms...

  • How to extract data from child form in OIM 11 g

    Hi all

    Can someone help me to fetch the child form given in OIM 11 g. I have the attribute multivalue in the child table. I am currently using the following code snippet to pick up the child, form data, but I'm not a great success. I get only the first record. Please let me know where I am going wrong.

    long formDefKey = formInstanceOperationsIntf.getProcessFormDefinitionKey (processKeyInstance);
    int iVersion = formInstanceOperationsIntf.getProcessFormVersion (processKeyInstance);

    tcResultSet childFormDefs = formInstanceOperationsIntf.getChildFormDefinition (formDefKey, iVersion);

    for (int i = 0; i < childFormDefs.getRowCount (); i ++) {}
    childFormDefs.goToRow (i);
    tcResultSet childForm = formInstanceOperationsIntf.getProcessFormChildData (childFormDefs.getLongValue ("Structure Utility.Child Tables.Child Key"), processKeyInstance);
    String [] childColumnName = childForm.getColumnNames ();
    try {}
    for (int index = 0; index < childColumnName.length; index ++) {}
    System.out.println ("name:" + childColumnName [index]);
    System.out.println (childForm.GetStringValue (childColumnName [index]));
    }
    } catch {(tcColumnNotFoundException columnNotFoundException)
    throw new Exception ("error occurred then that of child column names:" + columnNotFoundException);
    }


    Thanks in advance.

    Try this code. pass the 'processInstanceKey' of your adapter and test :)
    The values that you also want to change the columns of the child table (UD_ADUSRC_KEY, UD_ADUSRC_VALUE etc.).

    ===============================
    tcFormInstanceOperationsIntf formIntf = OimServiceManager.getTcFormInstanceOperationsIntf ();
    long pFormDefinitionKey = formIntf.getProcessFormDefinitionKey (processInstanceKey);
    int pFormVersion = formIntf.getProcessFormVersion (processInstanceKey);

    Get the definition of the child form.
    tcResultSet formChildDefRS = formIntf.getChildFormDefinition (pFormDefinitionKey, pFormVersion);

    Get the key to the definition of child form
    long pchildFormDefKey = 0;
    If (formChildDefRS! = null) {}
    formChildDefRS.goToRow (0);
    try {}
    pchildFormDefKey = formChildDefRS.getLongValue ('Structure Utility.Child Tables.Child Key');
    } catch (tcColumnNotFoundException e) {}
    Logger.info ("tcColumnNotFoundException occurred in formChildDefRS.getLongValue");
    }
    }

    tcResultSet adChildFormData = formIntf.getProcessFormChildData (pchildFormDefKey, processInstanceKey);

    for (int i = 0; i)< ((tcresultset)adchildformdata).getrowcount();="" i++)="">
    ((tcResultSet) adChildFormData) .goToRow (i);
    long adUsrcKey = adChildFormData.getLongValue("UD_ADUSRC_KEY");
    String adUsrcGroupName = adChildFormData.getStringValue ("UD_ADUSRC_GROUPNAME");
    Logger.info ("adUsrcKey:" + adUsrcKey + "\t adUsrcGroupName:" + adUsrcGroupName);
    }
    ===============================

  • How to extract data using PL/SQL

    Hello
    I'm new to XMl, I just need to extract the id, type, the number from below because of the xml data. Any help will be much appreciated.

    < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:i24n = "http://www.w3.org/2005/09/ws-i24n" xmlns:typ = "http://oracle.com/determinations/server/10.3/rulebase/assess/types" >
    < SOAP - ENV:Envelope >
    < SOAP - ENV:Header >
    < i24n:international >
    en_US < i24n: local > < / i24n: local >
    < i24n:tz > GMT-0700 < / i24n:tz >
    < / i24n:international >
    < / SOAP - ENV:Header >
    < SOAP - ENV:Body >
    < type: assessment / response >
    < type: global instance >
    < typ:attribute id = "myfee" type = "currency" >
    < typ:number - 6.0 > out < / typ:number - out >
    < / typ:attribute >
    < typ:entity id = "entity_fee" >
    < typ:instance id = "8899776" >
    < typ:attribute id = "mycost" type = "currency" deducted = "true" >
    < typ:number - 108.0 > out < / typ:number - out >
    < / typ:attribute >
    < typ:attribute id = "myplace" type = "text" >
    < typ:text - out > K < / typ:text - out >
    < / typ:attribute >
    < typ:attribute id = "myroll" type = "text" >
    < typ:text - out > NNA < / typ:text - out >
    < / typ:attribute >
    < / typ:instance >
    < / typ:entity >
    < / typ: global instance >
    < / typ: assess / answer >
    < / SOAP - ENV:Body >
    < / SOAP - ENV:Envelope >

    Thank you

    Mhand

    Works for me.

    If you want to retrieve the attributes at different levels, use a descendant axis:

    SQL> with t as(
      2  select xmltype(
      3  '
      6  
      7  
      8  en_US
      9  GMT-0700
     10  
     11  
     12  
     13  
     14  
     15  
     16  100.0
     17  
     18  
     19  
     20  
     21  16.0
     22  
     23  
     24  D
     25  
     26  
     27  
     28  
     29  
     30  
     31  ') col
     32  from dual)
     33  select x.*
     34  from t,
     35       xmltable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV",
     36                                'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ")
     37       , 'SOAP-ENV:Envelope/SOAP-ENV:Body/typ:assess-response/typ:global-instance/descendant::typ:attribute'
     38         passing t.col
     39         columns
     40           id_1 varchar2(100) path '@id',
     41           type_1 varchar2(100) path '@type',
     42           val varchar2(100) path 'typ:number-val'
     43       ) x
     44  ;
    
    ID_1                     TYPE_1        VAL
    ------------------------ ------------- ----------
    Currency_type            dollar        100.0
    currency_fee             dollar        16.0
    currency_v_type          USD
     
    

Maybe you are looking for