XML document to the oracle tables - data isn't fatching

Hello
I'm new to xml and trying to extract some fields of XML to oracle to use more in the application tables. I wrote the following to extract the values, but nothing is fatching document:



<? XML version = "1.0" encoding = "UTF-8"? >
-dmsgo:DMS_GO_Interface xmlns:dmsgo = "https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1 DMS_GO_Interface_v1.xsd" >
< dmsgo:majorversion > 1 < / dmsgo:majorversion >
< dmsgo:identity context = datetimecreated "CONFGOFR_OUT" = "03/01/2011 10:51 ' source = 'go' sourceversion ="1.410.1"/ >"
-< dmsgo:prospect >
< code dmsgo:requestresponse = "0" / >
< dmsgo:references / >
-dmsgo:configurationcontext dataversion = LangueCode "2163" = "" orderingmarket = '867' saleslevel "O" = >
< dmsgo:configurationdate > 03/01/2011 < / dmsgo:configurationdate >
< / dmsgo:configurationcontext >
-< dmsgo:vehicle >
< dmsgo: variant baumuster = "2120482" manufacturercode = "2120482" / >
< dmsgo:desc > E 200 CGI BlueEFFICIENCY sedan RHD < / dmsgo:desc >
-< dmsgo:colorcombination >
< dmsgo:interiorcolor codeowner = 'C' manufacturercode = "4201" = ppmtype "to THE" > black leather < / dmsgo:interiorcolor >
< dmsgo:exteriorcolor = 'C' manufacturercode codeowner = "2497" ppmtype "READ" = > metal Brown corrosion < / dmsgo:exteriorcolor >
< dmsgo:paintzone manufacturercode = "" preference = "2" / > "
< / dmsgo:colorcombination >


INSERT INTO p1 (flux_name, elment_1, elment_2, elment_3)
SELECT flux_name, elment_1, elment_2, elment_3
FROM XMLTable)
XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as 'dmsgo'),
"dmsgo:DMS_GO_Interface/perspective/vehicle.
passage xmltype (bfilename('DMLDIR','prospect.xml'), nls_charset_id ('CHAR_CS'))
columns
path of varchar2 (20) flux_name "dmsgo:variant/@baumuster"
path of varchar2 (20) elment_1 "dmsgo:desc"
path of varchar2 (20) elment_2 ' dmsgo:colorcombination / interiorcolor',
path of varchar2 (20) elment_3 'dmsgo:colorcombination/interiorcolor/@manufacturercode '.
);

Help, please.

Looking forward to early response.

Thank you
Usman

Hello

'Re missing you the prefix to namespace on elements.
This should work:

SQL> SELECT flux_name, elment_1, elment_2, elment_3
  2  FROM XMLTable(
  3    XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as "dmsgo"),
  4    'dmsgo:DMS_GO_Interface/dmsgo:prospect/dmsgo:vehicle'
  5    passing xmltype(bfilename('DMLDIR','prospect.xml'), nls_charset_id('CHAR_CS'))
  6    columns
  7      flux_name varchar2(20) path 'dmsgo:variant/@baumuster',
  8      elment_1  varchar2(40) path 'dmsgo:desc',
  9      elment_2  varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor',
 10      elment_3  varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor/@manufacturercode'
 11  );

FLUX_NAME            ELMENT_1                                 ELMENT_2             ELMENT_3
-------------------- ---------------------------------------- -------------------- --------------------
2120482              E 200 CGI BlueEFFICIENCY Sedan RHD       Leather black        4201
 

Tags: Oracle Development

Similar Questions

  • XML from the Oracle Table data

    Hi all

    I'm new to this network. I'm also new to oracle XML package. I want a help with the query below.

    CREATE TABLE EMP (ID NUMBER PRIMARY KEY, NAME VARCHAR2 (10), TELEPHONE NUMBER);

    INSERT INTO EMP (ID, NAME, PHONE) VALUES (11, 'Joy', 1234);
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (22, 'Mike', 5678).
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (33, "Jason", NULL);
    COMMIT;

    I want to export data from the EMP table in an XML file with the format below.

    Power required:

    <? XML version = "1.0" encoding = "UTF-8"? > < Joy STATICDATA > < EMP > < ID > 11 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Mike STATICDATA > < EMP > < ID > 22 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Jason STATICDATA > < EMP > < ID > 33 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >

    I used some XML functions and you wrote the following query.

    Select XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8') xml EMP;

    my query output:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 11 / < ID >
    Joy of < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 22 / < ID >
    < NAME > Mike < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 33 / < ID >
    Jason < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >


    But I want the out as the power required above. all records in a single line. can someone help me achieve the desired output. also can I export all columns of the table with something like select * from the table in the XML file?

    Thank you
    Delobelle

    Don't know why you need it on a single line, but you could:

    Select XMLTYPE (REGEXP_REPLACE (XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8'), CHR (10) |)) ' *<><'))>
    FROM EMP;

    SY.

  • How to insert an XML document to the database table

    Here's one my XML document example I want to import into database

    Example XML Document
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DEPTXML department_id = "10" >
    SALES of < DEPARTMENT_NAME > < / DEPARTMENT_NAME >
    < EMPLIST >
    < EMP_T EMPLOYEE_ID = "30" >
    Scott < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < EMP_T EMPLOYEE_ID = "31" >
    Marie < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < / EMPLIST >
    < / DEPTXML >
    < / ROW >
    < ROW >
    < DEPTXML department_id = "20" >
    < DEPARTMENT_NAME > ACCOUNTING < / DEPARTMENT_NAME >
    < EMPLIST >
    < EMP_T EMPLOYEE_ID = "40" >
    John < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < EMP_T EMPLOYEE_ID = "41" >
    Jerry < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < / EMPLIST >
    < / DEPTXML >
    < / ROW >
    < / LINES >
    ********End***********

    Table in which I want to import this file

    hr_new_emp
    (
    department_id number,
    department_name varchar2 (50).
    Number of employe_id
    last_name varchar2 (50)
    )

    If your XML code is in a file, the easiest is to load as a CLOB in the file (google search will give you lots of results to load a file into a CLOB, so I won't detail it here). Once you have it as a CLOB you can fairly easily convert that XMLTYPE for example

      v_xml := XMLTYPE(v_clob);
    

    (assuming that v_xml is declared as XMLTYPE and v_clob is declared as a CLOB)

    Once you have it as an XMLTYPE that is simple to use XMLTABLE to break the XML into its components using SQL...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2  
      3  
      4  
      5  SALES
      6  
      7  
      8  Scott
      9  
     10  
     11  Mary
     12  
     13  
     14  
     15  
     16  
     17  
     18  ACCOUNTING
     19  
     20  
     21  John
     22  
     23  
     24  Jerry
     25  
     26  
     27  
     28  
     29  ') as xml from dual)
     30  --
     31  -- END OF TEST DATA
     32  --
     33  select x.department_id, x.department_name, y.employee_id, y.last_name
     34  from t
     35      ,xmltable('/ROWSET/ROW'
     36                passing t.xml
     37                columns department_id   number       path '/ROW/DEPTXML/@DEPARTMENT_ID'
     38                       ,department_name varchar2(30) path '/ROW/DEPTXML/DEPARTMENT_NAME'
     39                       ,emplist         xmltype      path '/ROW/DEPTXML/EMPLIST'
     40               ) x
     41      ,xmltable('/EMPLIST/EMP_T'
     42                passing x.emplist
     43                columns employee_id     number       path '/EMP_T/@EMPLOYEE_ID'
     44                       ,last_name       varchar2(30) path '/EMP_T/LAST_NAME'
     45*              ) y
    SQL> /
    
    DEPARTMENT_ID DEPARTMENT_NAME                EMPLOYEE_ID LAST_NAME
    ------------- ------------------------------ ----------- ------------------------------
               10 SALES                                   30 Scott
               10 SALES                                   31 Mary
               20 ACCOUNTING                              40 John
               20 ACCOUNTING                              41 Jerry
    

    ... and once you have selected the data as it is quite easy to use an INSERT statement around it to insert data into a table, as in a regular INSERT... Select...

    If you are dealing with large amounts of data or a more complex XML structure, you can consider using an XML schema to shred the data in tables.

    Example here...

    Re: XML processing in oracle file

    And you can also load XML data easily by using the function XDB (WebDAV) to Oracle. Details in the Oracle documentation for that or you could find help in the forum XML DB, which also has a FAQ detailing the different methods how to load XML shred data...

    DB XML FAQ

  • Insert data as XML into the Oracle Table

    Hi all

    I have a requirement where the data in XML format, and I need to insert into the Oracle Table. For example, I get XML data in the following format,
    < results >
    < row >
    < BANK_ACCOUNT_ID > 10010 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300968 < / BANK_ID >
    Vision operations < LEGAL_ENTITY > < / LEGAL_ENTITY >
    < BANK_NAME > BofA < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 10271-17621-619 < / BANK_ACCOUNT_NUM >
    < BANK_ACCOUNT_NAME > BofA-204 < / BANK_ACCOUNT_NAME >
    < BRANCH_NAME > New York < / BRANCH_NAME >
    USD < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 09 < / BALANCE_DATE >
    < LEDGER_BALANCE > 432705900.56 < / LEDGER_BALANCE >
    < / row >
    < row >
    < BANK_ACCOUNT_ID > 10091 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300984 < / BANK_ID >
    Vision industries < LEGAL_ENTITY > < / LEGAL_ENTITY >
    Barclay Bank < BANK_NAME > < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 70986798 < / BANK_ACCOUNT_NUM >
    Bank Multi currency-626 < BANK_ACCOUNT_NAME > Barclays < / BANK_ACCOUNT_NAME >
    Reading < BRANCH_NAME > < / BRANCH_NAME >
    GBP < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 14 < / BALANCE_DATE >
    < LEDGER_BALANCE > 24244085.24 < / LEDGER_BALANCE >
    < / row >
    < row >
    < BANK_ACCOUNT_ID > 10127 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300968 < / BANK_ID >
    < LEGAL_ENTITY > SSC U.S. 01 < / LEGAL_ENTITY >
    < BANK_NAME > BofA < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 4898744 < / BANK_ACCOUNT_NUM >
    < BANK_ACCOUNT_NAME > BofA SSC U.S. 02-7188 < / BANK_ACCOUNT_NAME >
    < BRANCH_NAME > New York < / BRANCH_NAME >
    USD < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 28 < / BALANCE_DATE >
    < LEDGER_BALANCE > 10783815.28 < / LEDGER_BALANCE >
    < / row >
    < / results >

    I like to write PLSQL code that will receive these data with XML tags and insert it into the Oracle Table. Is this possible with built-in XML features provided in the Oracle database?

    Please Guide...

    Kind regards
    Priyanka

    But the problem is the file XML is to have the details of the records if you carefully observed the XML file. But by using more high statement select I get output in the following format.
    ORG_ID REQ_LINE PO_NUMBER EXPECTED_REC_QTY USER_NAME REQ_NUMBER
    204204 1444714450 11 64446445 11 OPERATIONSOPERATIONS

    The table has only one row, so you get a single row as output.
    I'm surprised that you find useful examples showing how to divide the data into several lines.

    (1) create the table with the following option, it will optimize the performance of storage and query for large XML documents:

    CREATE TABLE xxios_xml_data_test(xml_data XMLTYPE)
    XMLTYPE COLUMN xml_data STORE AS SECUREFILE BINARY XML
    ;
    

    (2) interview table with:

    SQL> select x.*
      2  from xxios_xml_data_test t
      3     , xmltable(
      4         '/Results/Row'
      5         passing t.xml_data
      6         columns ORG_ID           number       path 'ORG_ID'
      7               , REQ_NUMBER       number       path 'REQ_NUMBER'
      8               , REQ_LINE         number       path 'REQ_LINE'
      9               , PO_NUMBER        number       path 'PO_NUMBER'
     10               , EXPECTED_REC_QTY number       path 'EXPECTED_REC_QTY'
     11               , USER_NAME        varchar2(30) path 'USER_NAME'
     12       ) x
     13  ;
    
        ORG_ID REQ_NUMBER   REQ_LINE  PO_NUMBER EXPECTED_REC_QTY USER_NAME
    ---------- ---------- ---------- ---------- ---------------- ------------------------------
           204      14447          1       6444                1 OPERATIONS
           204      14450          1       6445                1 OPERATIONS
     
    
  • Loading XML into the relational Table data

    Hello

    I get a generated XML file to other tools (Windows), I am trying to create a Linux shell script that will gather the necessary XML file to my Linux server, then ask Oracle to use this file to load the XML data into a relational table. This activity and the data will be needed on an ongoing basis.

    I tried two ways. First, I loaded the XML document into the database and tried to extract the data directly from the document, but it does not work. Now I want to try to read the data directly from the file on the server through select, however I don't get all the returned data. In the Select statement below, I am trying to query the data to see what is returned for my tests.

    Create Table ci_results_table (transactionID Varchar2 (100), //transactionID should be PrimaryKey but became errors in test of insert, PK so deleted NULL value)

    message Varchar2 (200),

    This Varchar2 (50).

    XMLType of the ProcessedDate,

    status Varchar2 (50).

    sourceFile VarChar2 (100));

    Select x.*

    from XMLTable)

    ' TSPLoadResults/results '.

    PASSAGE xmltype (bfilename('CMDB_DEVADHOCRESULTS_DIR','LoadResults-HP_146.results.xml'), nls_charset_id ('AL32UTF8'))

    COLUMNS

    transactionID PATH Varchar2 (100) 'TransactionID '.

    Result XMLType PATH 'result ',.

    Message Varchar2 (200) PATH "Message."

    PrimaryKey Varchar2 (50) PATH "PrimaryKey"

    Date of ProcessedDate path "ProcessedDate."

    Status Varchar2 (50) PATH "Status."

    SourceFile VarChar2 (100) PATH "SourceFileName.

    ) x

    ;

    Eventually, I'll have to build on that to limit the returned data to records where SourceFileName is like '% PA' and insert what is returned in to the ci_results_table. Attached is an example of the XML results file I am trying to load, it is named "ResultsTransformedtoUnix" because I used dos2Unix to convert Unix which can be good or bad. (I send the output file must be converted to the format BACK until the other application can read). Original (before converting Unix) file named in the script is also attached.

    Help, please. Thank you!

    Hello

    I see some bad things in your query.

    (1) obvious one, explaining why you get all the data: there is a typing error in the XQuery expression, there 'result' not'slead.

    (2) ProcessedDate can be extracted as a date (at least not directly) because it actually represents a timestamp, use the TIMESTAMP WITH time ZONE HOURS and cast back to DATE data type in the SELECT clause

    (3) transactionID is an attribute, it must be accessible with ' @' (or ' attribute:' axis)

    (4) if the encoding of file really is ISO-8859-1 as suggested in the prologue, then do not use AL32UTF8 but the name of the corresponding character set: WE8ISO8859P1

    Here is the query to work:

    select x.transactionID
         , x.Message
         , x.Primarykey
         , cast(x.ProcessedDate as date) ProcessDate
         , x.Status
         , x.SourceFile
    from XMLTable(
           '/TSPLoadResults/Result'
           PASSING xmltype(bfilename('XML_DIR','LoadResults-HP_146.results.xml'), nls_charset_id('WE8ISO8859P1'))
           COLUMNS
             transactionID Varchar2(100)            PATH '@transactionID',
             Message       Varchar2(200)            PATH 'Message',
             PrimaryKey    Varchar2(50)             PATH 'PrimaryKey',
             ProcessedDate timestamp with time zone PATH 'ProcessedDate',
             Status        Varchar2(50)             PATH 'Status',
             SourceFile    VarChar2(100)            PATH 'SourceFileName'
         ) x
    ;
    

    Directly on the file using this query will only be decently (for large files) on 11.2.0.4 and beyond.

    On older versions, first load the file into a (temporary) XMLType column with binary XML storage and CHOOSE from there.

    because I used dos2Unix to convert Unix which can be good or bad.

    This conversion should not be necessary.

  • Loading the values of XML tag parent in the Oracle table and the values of the child

    <project>
      
    <id>001</id>
      
    <name>Math Project</name>
      .
      .
      
    <team>
      
    <id>1</id>
      
    <name> Team Roger </name>
      .
      .
      
    </team>

      
    </project>
      
    <project>
      
    <id>002</id>
      
    <name>Science Project</name>
      .
      .
      
    <team>
      
    <id>2</id>
      
    <name> Team Alpha </name>  .
      
    </team>
      
    <team>
      
    <id>3</id>
      
    <name>Team Romeo </id>

      
    </project>

    It's the structure of the XML where the content is changed daily and the file is placed in "D:\Test_Dir". I'm trying to load a table (teams) with the details of the team and its corresponding parent, like this project:

    proj_id team_id team_name
    001 1   Team Roger
    002 2   Team Alpha
    002 3   Team Romeo
    Below is the pl/sql block I wrote:

    declare
    cursor proj_cur
    is select project_id from projects;
    proj_rec proj_cur
    %rowtype;
    begin
    for proj_rec in proj_cur
    loop
    INSERT INTO teams
    (team_id,team_name,project_id)
    WITH t AS
    (SELECT xmltype(bfilename('TEST_DIR','SCRUM.xml'), nls_charset_id('UTF8')) xmlcol FROM dual)
    SELECT 
    extractValue
    (value(x),'*/id')team_id
    ,extractValue(value(x),'*/name') team_name
    ,extractValue(value(y),'/project/id') project_id
    FROM t
    ,TABLE(XMLSequence(extract(t.xmlcol,'/scrumwise-export/data/account/projects/project'))) y
    ,TABLE(XMLSequence(extract(t.xmlcol,'/scrumwise-export/data/account/projects/project/people/teams/team'))) x
    where (extractValue(value(y),'/project/id'))='emp_rec.project_id';
    end loop;
    end;


    This returns a cartesian product! Any help with this is much appreciated.

    A few additional tips BTW:

    -do not use wildcards (*) when you really know the structure of the XML document and the name of the node you want to extract.

    -use the UTF8 character set is not recommended because it supports any valid XML characters. Use rather AL32UTF8 .

    So, similar to Kim:

    select proj.project_id
         , team.team_id
         , team.team_name
    from xmltable(
           '/scrumwise-export/data/account/projects/project'
           passing xmltype(bfilename('XML_DIR','SCRUM.xml'), nls_charset_id('AL32UTF8'))
           columns
             project_id  varchar2(3) path 'id'
           , teams       xmltype     path 'people/teams/team'
          ) proj
        , xmltable(
            '/team'
            passing proj.teams
            columns
              team_id     number         path 'id'
            , team_name   varchar2(100)  path 'name'
          ) team
    where exists (
      select null
      from projects p
      where p.id = proj.project_id
    ) ;
    

    Or a shorter version using a single XMLTABLE:

    select team.project_id
         , team.team_id
         , team.team_name
    from xmltable(
           'for $i in /scrumwise-export/data/account/projects/project
              , $j in $i/people/teams/team
            return element r {
              element project_id {$i/id}
            , $j/id
            , $j/name
            }'
           passing xmltype(bfilename('XML_DIR','SCRUM.xml'), nls_charset_id('AL32UTF8'))
           columns
             project_id  varchar2(3)    path 'project_id'
           , team_id     number         path 'id'
           , team_name   varchar2(100)  path 'name'
         ) team
    where exists (
      select null
      from projects p
      where p.id = team.project_id
    ) ;
    

    And if a project can have no team, you can the outer join the XMLTABLE 2nd instead:

        , xmltable(
            '/team'
            passing proj.teams
            columns
              team_id     number         path 'id'
            , team_name   varchar2(100)  path 'name'
          ) (+) team
    
  • Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    My main.js resembles

    xmlDataSource var = {}
     
    URL: 'dcds. - symbianxml.aspx", etc. (sample).
     
    init: function() {}
    URL, successful reminder, the reminder of failure
    This.Connect (this.) (URL, this.responseHandler, this.failureHandler);
    },
     
    /**
    * Analyzes the XML document in an array of JS objects
    @param xmlDoc XML Document
    * @returns {table} array of objects of the device
    */
    parseResponse: {function (xmlDoc)}
        
    var chElements = xmlDoc.getElementsByTagName ("channel");
       
    channels of var = [];
      
    Console.log (chElements.Length);
      
    for (var i = 0; i)< chelements.length;="">
        
    var channel = {};
       
    for (var j = 0; j)< chelements[i].childnodes.length;="">
        
    var node = Sublst.ChildNodes(1).ChildNodes(0) chElements [i] [j];
                
    If (node.nodeType! = 1) {//not an element node}
    continue;
    }
           
    Channel [node. TagName] = node.textContent;
    }
       
    Channels.push (Channel);
    }
    Console.log (Channels.Length);
    return the strings;
    },
     
    /**
    Manages the response and displays the data from device web app
    @param xmlDoc
    */
    responseHandler: {function (xmlDoc)}
      
    var channel = this.parseResponse (xmlDoc);
    var markup = "";
       
    for (i = 0; i< channels.length;="">
       
    markup += this.generateHTMLMarkup (i, channels [i]);
    }
    document.getElementById("accordian").innerHTML = mark-up;
    },
     
    /**
    Generates HTML tags to insert in to the DOM Web App.
    * @index i, index of the device
    @param device, device object
    */
    /*
    generateHTMLMarkup: function (i, channel) {}
      
    var str ="";
    "Str += '.


    ' onclick =-"mwl.setGroupTarget ('#accordian ',' #items_" + i + "', 'ui-show ',' ui - hide');" + ".
    "mwl.setGroupTarget ('#accordian ',' item_title_ #" + i + "', 'ui-open', 'ui-farm'); Returns false; \ » > » ;
    "" Str += "" + channel ['name'] + ' ";
    "Str += '.
    ";
    "Str += '.
    ";
    "Str += '.
    "+" id: "+ channel ['id'] +" ' "
    ";
    "Str += '.
    "+" type: "+ channel ['type'] +" ' "
    ";
    "Str += '.
    "+" language: "+ channel ['language'] +" ' "
    ";
    "Str += '.
    «+ "bandwidth:" + "fast" channel + "»»
    ";
    "Str += '.
    "+" cellnapid: "+ channel ["cellnapid"] +". "
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
    "Str += '.
    ";
    return str;
    },*/
    generateHTMLMarkup: function (i, channel) {}
       
    var str ="";
    "Str += '.
    ";
    str +=  "" +
    "" + channel ['name'] + ""+""
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
         
    return str;

    },
     
    failureHandler: {function (reason)}
    document.getElementById("accordian").innerHTML = "could not get XML document.
    '+ reason;
    },
     
    /**
    Retrieves a resource XML in the given URL using XMLHttpRequest.
    @param url URL of the XML resource to retrieve
    @param called successCb, in the XML resourece is recovered successfully. Retrieved XML document is passed as an argument.
    @param failCb called, if something goes wrong. Reasons, in text format, is passed as an argument.
    */

    Connect: {function (url, successCb, failCb)
      
    var XMLHTTP = new XMLHttpRequest();
      
    XMLHTTP. Open ("GET", url, true);

    xmlhttp.setRequestHeader("Accept","text/xml,application/xml");
    xmlhttp.setRequestHeader ("Cache-Control", "non-cache");
    xmlhttp.setRequestHeader ("Pragma", "non-cache" "");
      
    var that = this;
    XMLHTTP.onreadystatechange = function() {}
       
    If (xmlhttp.readyState == 4) {}
        
    If (XMLHTTP. Status == 200) {}
         
    {if (!) XMLHTTP.responseXML)}
    try {}
    If server has not responded with good an XML MIME type.
    var domParser = new DOMParser();
    var xmlDoc = domParser.parseFromString(xmlhttp.responseText,"text/xml");
           
    successCb.call (that, xmlDoc);
           
    } catch (e) {}
    failCb.call (, "answer was not in an XML format.");
    }
              
    } else {}
    successCb.call (that, xmlhttp.responseXML);
    }
    } else {}
    failCb.call (this, "connection failed: status"+ xmlhttp.status ");
    }
    }
    };
    XMLHTTP. Send();
    }
    };

    Please see the content in main.js is fully analyzed.

    Forward for the solution to my request all members of the community...

  • ODI - read CSV file and write to the Oracle table

    Hello world

    After 4 years, I started to work again with ODI, and I'm completely lost.

    I need help, I don't know what to use for each step, interfaces, variables, procedures...

    What I have to do is the following:

    (1) reading a CSV file-> I have the topologies and the model defined

    (2) assess whether there is a field of this CSV file in TABLE A-> who do not exist in the table is ignored (I tried with an interface joining the csv with the TABLE model a model and recording the result in a temporary data store)

    Evaluate 3) I need to update TABLE C and if not I need to INSERT if another field that CSV exists in TABLE B-> if there

    Could someone help me with what use?

    Thanks in advance

    Hi how are you?

    You must:

    Create an interface with the CSV template in the source and a RDBM table in the target (I'll assume you are using Oracle). Any type of filter or the transformation must be defined to be run in the stadium. (you must use a LKM for SQL file and add an IKM Sql control (it is best to trim them and insert the data when it cames to a file if you want after this process, you may have an incremental update to maintain history or something like that).)

    For validation, you will use a reference constraints in the model of the oracle table: (for this you need a CKM Oracle to check constraints)

    Then, you must select the table that you sponsor and in the column, you choose which column you will match.

    To article 3, you repeat the above process.

    And that's all. Pretty easy. If you do not have the two tables that you need to use your validation that you need to load before loading the CSV file you need valid.

    Hope this can help you

  • Delete triggers in DAC to the Oracle apps data source

    Hey guys,.

    We use OLIVIER 7.9.6.1 and OBIEE 10.1.3.4.0. data source is Oracle apps 11.5.9.

    We had a problem in the report. drillthrough report 6 records where as source has only 4 records. Looks like 2 deleted source records and we have never implemented here delete triggers. I'm new to this project and don't know how to implement for the Oracle apps data source delete triggers. because there is no concept of picture table in oracle apps.

    I tried a full load of the fact table, and it is fetching 4 records as expected. so please tell me how to apply delete triggers for the oracle apps data source. explain the process step by step.

    Thank you for your help.

    Thank you
    Jay.

    You can follow the same EP and remove the mapping process that are out of the box for your custom tables. Make sure you include a DELETE_FLG on the custom tables and follows the same logic of PE and Delete is used in vanilla maps. You must have a primary key to check the records of if.which have been removed. Once you have the full mappings, you can set the DAC to assocaiated tasks and include them with your execution plans. As Oracle has followed this process, its best to stay w the same strategy.

  • Help to download the xml of the oracle table below

    Dear all,

    I tried best to download the below xml to oracle table but giving the link between the tables is very difficult for me. can someone help me to import the XML below for oracle table

    <? XML version = "1.0" encoding = "utf-8"? >
    < Claim.Submission xmlns:tns = "http://www.haad.ae/DataDictionary/CommonTypes" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: noNamespaceSchemaLocation = "http://www.haad.ae/DataDictionary/CommonTypes/ClaimSubmission.xsd" >
    < header >
    MF65 < SenderID > < / SenderID >
    C014 < ReceiverID > < / ReceiverID >
    < TransactionDate > 03/12/2012 10:40 < / TransactionDate >
    < RecordCount > 1 < / RecordCount >
    < DispositionFlag > PRODUCTION < / DispositionFlag >
    < / header >
    < claim >
    < ID > 23112 / < ID >
    < MemberID > 100000874 < / MemberID >
    A022 < PayerID > < / PayerID >
    MF65 < ProviderID > < / ProviderID >
    < EmiratesIDNumber > 111-1111-1111111-1 < / EmiratesIDNumber >
    < raw > 115 < / gross >
    < PatientShare > 20 < / PatientShare >
    < net > 95 < / Net >
    < meeting >
    MF65 < FacilityID > < / FacilityID >
    < type > 1 < / Type >
    < > 47685 PatientID < / PatientID >
    < Start > 02/11/2012 12:00 < / Start >
    < / meeting >
    < Diagnostics >
    Principal of < type > < / Type >
    < code > < code > 461.9
    < / Diagnosis >
    < Diagnostics >
    Secondary < type > < / Type >
    < code > < code > 462
    < / Diagnosis >
    < activity >
    23112_1 < ID > < /ID >
    < Start > 02/11/2012 12:00 < / Start >
    < type > 3 < / Type >
    < code > < code > 99202
    < quantity > 1 < / quantity >
    < net > 95 < / Net >
    D1310 < clinician > < / clinician >
    < / activity >
    < / claim >
    < Claim.Submission >

    Pls tell me how I can get

    Have you considered using the storage relational object for this?
    Since you have patterns, you could record in the database, which will automatically create storage appropriate for your XML documents as well as validate at the time of insertion.
    You can then create individual views to query the nested parts of the document and finally insert the data into relational tables final.

    See the documentation for an introduction to the concepts:
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/partpg2.htm#g997354

    You will find examples on the {forum: id = 34} forum and its FAQ: {: identifier of the thread = 410714}

  • How to import the XML file into an oracle table using a BPEL process

    Hi friends

    How can I import XML file in the db oracle table using a BPEL process

    (1) I have generated an XML file in my local system with a field
    (2) I created a temporary table in my oracledb with the same field in the XML file
    (3) that I want to import these XML files which is the local host to my db oracle using a BPEL process
    (4) for that what steps should I me fallow please suggest me if there is no document for this?

    Thanks in advance
    AT

    Hi to

    Here you go...

    http://blogs.Oracle.com/ajaysharma/2011/03/using_file_adapter_database_adapter_and_mediator_component_in_soa_11g.html

    I hope that helps!

    Thank you
    AJ

  • Create the flat file data from the oracle table

    d_adp_num char (10)
    d_schd_date tank (8)
    d_sched_code tank (25)
    d_pay_code char (50)
    d_mil_start char (4)
    d_mil_end char (4)
    d_duration char (5)
    d_site_code char (4)
    d_dept_id tank (6)

    Select payroll_id,
    schedule_date,
    reason_code, (sched_code)
    reason_code, (pay_code)
    start_time,
    end_time,
    total_hours,
    site_code,
    department_id
    of dept_staff
    where schedule_date between (sysdate + 1) and (sysdate + 90)


    loading data for the date range instead.
    sched_code - if 'Unavailable' reason_code = 'OD' and 'THE '.

    pay_code - "Berevevement BD" If reason_code = "BD".
    "UP PTO without reasonable excuse" If reason_code = 'UP '.
    "RG" If reason_code = "SH".
    "PTO" If reason_code = "GO".
    Here are some...

    start_time and end_time - convert military time
    based on start_ampm and end_ampm

    On this basis, I need help to create a flat file. Sewing of the flat and data file in dept_staff sample

    If site_code is there so no need to get department_id (see the sample flat file)
    ------------------------------------

    examples of data to flat file

    ZZW002324006072012 PTO
    0800160008.00
    ZZW002428106072012 RG
    1015174507.50HM34
    ZZW002391606072012 RG
    1100193008.50
    ZZW002430406072012 RG
    1100193008.50 130000
    ----------------------------

    dept_staff table data

    REASON_CODE_1 PAYROLL_ID SCHEDULE_DATE REASON_CODE START_TIME, END_TIME START_AMPM END_AMPM TOTAL_HOURS SITE_CODE DEPARTMENT_ID
    ZZW0024468 08/06/2012 HS HS 730 HAS 400 850 12 P
    ZZW0000199 08/06/2012 HS HS 730 HAS 400 850 14 P
    ZZW0023551 08/06/2012 SH SH 1145 A 930 975 GH08 95 P
    ZZW0024460 08/06/2012 SH SH 515 HAS 330 P 1025 GH08 95
    ZZW0023787 08/06/2012 SH SH 630 HAS 300 850 24 P
    ZZW0024595 08/06/2012 TR TR 730 HAS 400 850 90 P
    ZZW0023516 08/06/2012 OD OD 800 HAS 400 800 95 P
    ZZW0023784 08/06/2012 OD OD 800 HAS 400 800 5 P
    ZZW0024445 08/06/2012 SH SH 1145 A GH08 930 975 5 P
    ZZW0024525 08/06/2012 OD OD 800 HAS 400 800 23 P
    ZZW0024592 08/06/2012 TR TR 730 HAS 400 850 5 P
    ZZW0024509 08/06/2012 SH SH 95 MK21 830 HAS 330 P 700

    ZZW0023916 06/14/2012 SH SH 1100 A 850 27 730 P

    How to ask questions
    SQL and PL/SQL FAQ

    UTL_FILE allows to write the OS file

  • Remove duplicates from the oracle table using 2 columns

    Hello

    I need to remove the duplicates of an oracle table based on 2 columns in the table.i tried to remove duplicates using the join, but get the error like sql error ora-00933

    Thank you

    Hello

    Here's one way:

    DELETE FROM table_x

    WHERE ROWID NOT IN)

    SELECT MIN (ROWID)

    FROM table_x

    Col_1, col_2

    );

    I hope that answers your question.

    If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.

    In the case of a DML operation (for example, REMOVE) the sample data should show what look like the paintings before the DML, and results will be the content of the or the tables changed after the DML.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

  • Need help for query flat_file type clobdata oracle table data.

    Hi Sir,

    I need help to query oracle table flat file data having given clob type.
    Oracle Version:
    
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    
    
    Source table
    
      CREATE TABLE order_details 
       (     QUEUE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, 
         LINE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, 
         CHAR_DATA CLOB, 
         OPTIMISTIC_LOCK_KEY NUMBER(20,0)
       ) 
    COLUMN FOR CHAR_DATA FLAT_FILE
    EU,6067AT,AT10,000000402004,NexiumGERDManagementProject,Z435,,ZZ29,NIS-GOLD,AT
    EU,6067AT,AT10,000000402038,NIS-OEU-ARI-2007/1,Z450,,ZZ29,NIS-OEU-ARI-2007/1,AT
    EU,6067AT,AT10,000000402039,SymbicortNISinCOPD,Z450,,ZZ29,NIS-REU-DUM-2007/1,AT
    EU,6067AT,AT10,000000402040,D1443L00044SeroquelXRRuby,Z450,,ZZ29,D1443L00044,AT
    EU,6067AT,AT10,000000402041,NIS-GEU-DUM-2008/1,Z450,,ZZ29,NIS-GEU-DUM-2008/1,AT
    EU,6067AT,AT10,000000402042,SonstigeAktivitätenLCM,Z450,,ZZ29,.,AT
    EU,6067AT,AT10,000000402134,D1680L00002Saxagliptin,Z450,,ZZ29,D1680L00002,AT
    EU,6067AT,AT10,000000402199,SeroquelWaveNIS,Z450,,ZZ29,NIS-NEU-DUM-2009/1,AT
    EU,6067AT,AT10,000000402313,SeroquelExtra(D1443L00082),Z450,,ZZ29,D1443L00082,AT
    EU,6067AT,AT10,000000402517,AtlanticD5130L00006(AZD6140),Z450,,ZZ29,D5130L00006,AT
    EU,6067AT,AT10,000000554494,ArimidexSt.Gallen(13+2),Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554495,ArimidexASCO(5delegates),Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554496,ArimidexSanAntonio6delegates,Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554497,ArimidexBreastCancerSummit(13+2),Z130,,ZZ09,,AT
    EU,6067AT,AT10,000000554498,ArimidexEIH(15delegates),Z130,,ZZ09,,AT
    EU,6067AT,AT10,000000554499,ArimidexNIFA(200delegates),Z135,,ZZ09,,AT
    EU,6067AT,AT10,000000554500,ArimidexNIFAworkshops(8x25),Z135,,ZZ09,,AT
    EU,6067AT,AT10,000000554501,ArimidexPraktischeGyn.Fortbildung,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554502,ArimidexAGO,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554503,ArimidexHämato/OnkologieKongress,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554504,ARIMIDEXGYNäKOLOGENKONGRESS,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554505,ArimidexChirurgenkongress,Z147,,ZZ09,,AT
    EXPECTED RESULTS:
    AFFIRM_CODE COMPANY_CODE INTERNAL_ORDER_CODE INTERNAL_ORDER_DESC ENIGMA_ACTIVITY             SUB_ACTIVITY_CODE IN_AFF_IND ORDER_TYPE EXTERNAL_ORDER COUNTRY        
    EU          6067AT       AT10                 000000402004       NEXIUMGERDMANAGEMENTPROJECT     Z435           NULL        ZZ29       NIS-GOLD        AT             
    EU          6068AT       AT11                 000000402005       NEXIUMGERDMANAGEMENTPROJECT     Z435           NULL        ZZ29       NIS-GOLD        AT             

    Sorry, my bad. Without database at hand, I'll try 'baby steps' (borrowed from Frank) so you don't confuse it with errors that I might add (happens far too often already, but at least you won't "swallow" as forum members think is one of the main goals of this fighter - help her learn - providing not only the proverbial fish.)
    Search the Forum - your problem is one of its best sellers. Watching {message identifier: = 10694602} ("split string into" was the key word used in research) you can try something as

    select table_row,
           level clob_row,
           regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) the_line
      from (select to_char(queue_seqnum)||':'||to_char(line_seqnum) table_row,
                   char_data
              from order_details
           )
     connect by regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) is not null
            and prior char_data = char_data
            and prior table_row = table_row
            and prior sys_guid() is not null
    

    to get all the s the_lineall CLOB and after that the use of the example even to get your columns of each the_line.

    Concerning

    Etbin

    Edited by: Etbin on 3.2.2013 09:01

    .. .but I m connected to do things according to the instructions, I can't do something.

    Used to happen to me too and I did as told to the but only after explaining any disadvantages, I was aware of in time. The last sentence is usually: "O.K. now be just and Don't come back with that kind of thing when it turns out that this isn't the right thing."
    rp0428 post - something to remember.

  • Essbase Studio impossible to 'Examining the sample data' in the Oracle DB Data Source

    E.M.P. version 11.1.2.3.500

    Oracle DB 11.2.0.4

    on Windows 2008R2

    I created a user DB ESSTBC with the following user privileges

    CREATE SESSION, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW

    This is my first attempt on the Essbase Studio, so I executed the following scripts as the user ESSTBC to create the TBC tables and load the data

    tbc_create_oracle. SQL

    tbc_sampledata. SQL

    I am able to connect with ESSTBC and select the tables all loaded and made sure the data is loaded correctly

    Then in the Studio of Essbase, I created a data source, which I can list all the tables in the schema ESSTBC in 'Data Source Navigator'. I also managed to create a Minischema by joining the tables SALES, SCENARIO, and MEASURES.

    However, in "Data Source Navigator" when I select "SCENARIO", right click and select "View Sample Data", I am able to pull data from the table. that is the table with all the names of columns grid but no data. No error messages were shown in "Messages to the Console.

    Back to Developer SQL and connect the same DB as ESSTBC, I have no problem do a "SELECT * SCRIPT;" and recover all the data of the table without a problem.

    I proceed creating dimensions elements then a hierarchy of "SCENARIO". But again when I try to get a glimpse of the hierarchy has got an empty tree. Apparently, there's something wrong,

    No matter what mark on what I missed?

    Thank you very much.

    Problem solved. The cause being my stupidity ruin a access DB. I can see examples of data without changing anything in Essbase Studio after you change the DB user rights.

Maybe you are looking for

  • When you visit a Web site, how can I send the site to a friend?

    Often my wife will send a website to our girls by email. There was formerly a button she could click on that would bring his e-mail account, she said. We recently had to download Firefox on a new computer, and now she is unable to find this button. I

  • Opening a file .pages on a Mac that doesn't have the Pages app

    I was sent a .pages file.  I can't open because I don't have the Pages application loaded on my MacBook (10.9.5).  How can I open the file?

  • I have problem with my Mobile data

    I am using Lenovo X 2 - AP and I've updated for android to these daily 5.0 version (why, I don't have internet or ADSL I have update my mobile data, I download update on yesterday and install the update on this morning (GMT + 7)) Everything works fin

  • New T450s "locks" itself after 1 minute

    Hi, I just that yesterday. Screen saver is set to NONE. Power options are defined to never sleep or something like that. Require a password on wake up is set to OFF, but I always get the message "LOCKED" and I have to click on my access icon. There i

  • Photosmart 6510 "the printer could not connect to the server.

    Hi all. Just try to find this sorted hope someone can help. I am able to print irelessly of all our devices with no problems at all. However, when I click on the control panel applications he repeats me "the printer could not connect to the verificat