Database data to nested xml structure

Hi All,
I need to convert the data in the oracle database to nested xml tree structure as below:
Data in the database is in the following structure:
1     branch1     13-JAN-11     a.txt
1     branch1     25-JAN-11     b.txt
1     branch1     25-JAN-11     c.txt
1     branch2     20-JAN-11     d.txt
2
XML for the above data should be in the format:
<Root>
<Account_no value="1">
<Desc value="branch1">
<Date value="13-JAN-11">
<Name value="a.txt"/>
</Date>
<Date value="25-JAN-11">
<Name value="b.txt"/>
<Name value="c.txt"/>
</Date>
</Desc>
<Desc value="branch2">
<Date value="20-JAN-11">
<Name value="d.txt"/>
</Date>
</Desc>
</Account_no>
<Account_no value="2">
</Account_no>
</Root>
I am able to get this kind of xml structure using java after storing the database data in a n-ary tree. But it takes more time to execute.
Can this kind of same xml format be achieved using pl/sql programming?
Please help me with your valuable insights.
Thanks,
Alagappan

Hi,
Please always mention your db version (select * from v$version).
Here's one solution using SQL/XML functions :
Sample data used :
create table sample_data
  account_no  number,
  description varchar2(30),
  dt          date,
  name        varchar2(30)
insert into sample_data values(1, 'branch1', to_date('13-JAN-11','DD-MON-RR'), 'a.txt');
insert into sample_data values(1, 'branch1', to_date('25-JAN-11','DD-MON-RR'), 'b.txt');
insert into sample_data values(1, 'branch1', to_date('25-JAN-11','DD-MON-RR'), 'c.txt');
insert into sample_data values(1, 'branch2', to_date('20-JAN-11','DD-MON-RR'), 'd.txt');
insert into sample_data values(2, 'branch3', to_date('20-JAN-11','DD-MON-RR'), 'e.txt');Query :
SELECT xmlserialize(document
         xmlelement("Root",
           xmlagg(
             xmlelement("Account_no", xmlattributes(account_no as "value"),
               xmlagg(
                 xmlelement("Desc", xmlattributes(description as "value"), dt)
                 order by description
             ) order by account_no
       as clob indent ) doc
FROM (
  SELECT account_no, description,
         xmlagg(
           xmlelement("Date", xmlattributes(to_char(dt,'DD-MON-RR') as "value"), name)
           order by dt
         ) dt
  FROM (
    SELECT account_no, description, dt,
           xmlagg(
             xmlelement("Name", xmlattributes(name as "value"))
             order by name
           ) name
    FROM sample_data
    GROUP BY account_no, description, dt
  GROUP BY account_no, description
GROUP BY account_no
DOC
<Root>
  <Account_no value="1">
    <Desc value="branch1">
      <Date value="13-JAN-11">
        <Name value="a.txt"/>
      </Date>
      <Date value="25-JAN-11">
        <Name value="b.txt"/>
        <Name value="c.txt"/>
      </Date>
    </Desc>
    <Desc value="branch2">
      <Date value="20-JAN-11">
        <Name value="d.txt"/>
      </Date>
    </Desc>
  </Account_no>
  <Account_no value="2">
    <Desc value="branch3">
      <Date value="20-JAN-11">
        <Name value="e.txt"/>
      </Date>
    </Desc>
  </Account_no>
</Root>
Here, I used XMLSerialize function with indent option to format the output (available starting with 11g).

Similar Messages

  • Nested XML structure from Oracle

    Using the SQL Adapter i BizTalk, calling a SQL Stored procedure on a MS SQL DB, I can get a nice nested XML structure using p JOIN ii and FOR XML AUTO, like this
    <p code="DK003">
    <ii stamp="2013-01-14T10:27:38.790"value="180.702052"price="184.000000">
    <d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
    </ii>
    <ii stamp="2013-01-14T10:27:38.790"value="181.702052"price="14.000000">
    <d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
    </ii>
    </p>
    How can I get the same on Oracle ??

    Hi E.,
    I guess this an XML namespace issue. I'm creating XmlForms-style documents and had to add an XML namespace to my root element to make them visible as such:
    Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
    root.addNamespaceDeclaration(xf);
    So what I'd suggest to you is reading out the IResource and treating the content as XML:
    Document document = new  SAXBuilder().build(content.getInputStream());
    Element root = document.getRootElement();
    Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
    root.removeNamespaceDeclaration(xf);
    Hope this helps!
    regards,
    Christian

  • Retrieve data from recursive XML structure

    Hi,
    I had a XML which is something like below
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <Relationship>
    <Name>John</Name>
    <Age>99</Age>
    <Gender>Male</Gender>
    <Children ID='1'>
         <Name>Peter</Name>
         <Age>55</Age>
         <Gender>Male</Gender>
         <Children ID='1'>
              <Name>Winnie</Name>
              <Age>40</Age>
              <Gender>Female</Gender>
              <Children ID='1'>
                   <Name>Sam</Name>
                   <Age>20</Age>
                   <Gender>Male</Gender>
              </Children>
         </Children>          
    </Children>     
    <Children ID='2'>
         <Name>Mike</Name>
         <Age>50</Age>
         <Gender>Male</Gender>
         <Children ID='1'>
              <Name>Jessica</Name>
              <Age>40</Age>
              <Gender>Female</Gender>
              <Children ID='1'>
                   <Name>Harison</Name>
                   <Age>20</Age>
                   <Gender>Male</Gender>
              </Children>
         </Children>          
    </Children>     
    </Relationship>
    As you see, the node <Name><Age><Gender><Children> is repeated within every <Children> node
    My question are:
    1. Is is possible to retrieve all the <Name> value if we don't know how deep is the <Children> node?
    2. Is is possible to retrieve the father and son/daugther relationship, i.e. John --> Peter, John-->Mike, Peter-->Winne, Mike-->Jessica
    Thanks
    Vincent

    Hi Vincent,
    For 1, use a descendant axis, like this :
    SQL> var xmldoc varchar2(4000)
    SQL>
    SQL> begin
      2   :xmldoc := '<?xml version="1.0" encoding="iso-8859-1" ?>
      3  <Relationship>
      4  <Name>John</Name>
      5  <Age>99</Age>
      6  <Gender>Male</Gender>
      7  <Children ID="1">
      8   <Name>Peter</Name>
      9   <Age>55</Age>
    10   <Gender>Male</Gender>
    11   <Children ID="1">
    12    <Name>Winnie</Name>
    13    <Age>40</Age>
    14    <Gender>Female</Gender>
    15    <Children ID="1">
    16     <Name>Sam</Name>
    17     <Age>20</Age>
    18     <Gender>Male</Gender>
    19    </Children>
    20   </Children>
    21  </Children>
    22  <Children ID="2">
    23   <Name>Mike</Name>
    24   <Age>50</Age>
    25   <Gender>Male</Gender>
    26   <Children ID="1">
    27    <Name>Jessica</Name>
    28    <Age>40</Age>
    29    <Gender>Female</Gender>
    30    <Children ID="1">
    31     <Name>Harison</Name>
    32     <Age>20</Age>
    33     <Gender>Male</Gender>
    34    </Children>
    35   </Children>
    36  </Children>
    37  </Relationship>';
    38  end;
    39  /
    PL/SQL procedure successfully completed
    SQL>
    SQL> select x.*
      2  from xmltable(
      3        '/Relationship/descendant::Children/Name'
      4        passing xmltype(:xmldoc)
      5        columns name varchar2(30) path '.'
      6       ) x
      7  ;
    NAME
    Peter
    Winnie
    Sam
    Mike
    Jessica
    Harison
    6 rows selected
    If you want to include "John" in the result set, just replace the XQuery expression with '/Relationship/descendant::Name'.
    For 2, here's one way :
    SQL> select x.*
      2  from xmltable(
      3        'for $i in /Relationship/descendant::Name
      4           , $j in $i/following-sibling::Children/Name
      5         return element r {
      6           element parent {$i/text()}
      7         , element child {$j/text()}
      8         }'
      9        passing xmltype(:xmldoc)
    10        columns parent_name varchar2(30) path 'parent'
    11              , child_name  varchar2(30) path 'child'
    12       ) x
    13  ;
    PARENT_NAME                    CHILD_NAME
    John                           Peter
    John                           Mike
    Peter                          Winnie
    Winnie                         Sam
    Mike                           Jessica
    Jessica                        Harison
    6 rows selected
    Or the recursive approach :
    SQL> select x.*
      2  from xmltable(
      3        'declare function local:getChildren($p as element()) as element()*
      4         {
      5          for $i in $p/Children
      6          return (
      7            element r {
      8              element parent_name {$p/Name/text()}
      9            , element child_name {$i/Name/text()}
    10            }
    11          , local:getChildren($i)
    12          )
    13         }; (::)
    14         local:getChildren(/Relationship)'
    15        passing xmltype(:xmldoc)
    16        columns parent_name varchar2(30) path 'parent_name'
    17              , child_name  varchar2(30) path 'child_name'
    18       ) x
    19  ;
    PARENT_NAME                    CHILD_NAME
    John                           Peter
    Peter                          Winnie
    Winnie                         Sam
    John                           Mike
    Mike                           Jessica
    Jessica                        Harison
    6 rows selected
    Edited by: odie_63 on 24 août 2011 12:12

  • Nested XML with XSU

    I have data in an Oracle8i-database and will use Java to export
    it to XML. I&#8217;m trying to use XML Developer&#8217;s Kit&#8217;s (XDK&#8217;s) XML
    SQL Utility&#8217;s (XSU&#8217;s) OracleXMLQuery class. But I&#8217;ve problems to
    get the nested XML-structure I need!
    Oracle says there&#8217;s two good ways to do this:
    &#8220;Source Customization
    This category incompases customizations done by altering the
    query or the database schema. Among the simplest and the most
    powerful source customizations are:
    * over the database schema, create an object-relational view
    which maps to the desired XML document structure.
    * in your query, use cursor subqueries, or cast-multiset
    constructs to get nesting in the XML document which comes from a
    flat schema.&#8221;
    They then have an example how to create an object-relational
    view. But this is done with an empty database, and I already
    have tables with data so I don&#8217;t know how to do this.
    I&#8217;ve tried with some simple subqueris like
    SELECT name, id,
    (SELECT COUNT(*) FROM order o WHERE c.id = o.id) AS
    NumOfOrders
    FROM cust c
    But it adds just another colum.
    Could somebody help me or direct me to some resource, please?
    Thanks!

    I have data in an Oracle8i-database and will use Java to export
    it to XML. I&#8217;m trying to use XML Developer&#8217;s Kit&#8217;s (XDK&#8217;s) XML
    SQL Utility&#8217;s (XSU&#8217;s) OracleXMLQuery class. But I&#8217;ve problems to
    get the nested XML-structure I need!
    Oracle says there&#8217;s two good ways to do this:
    &#8220;Source Customization
    This category incompases customizations done by altering the
    query or the database schema. Among the simplest and the most
    powerful source customizations are:
    * over the database schema, create an object-relational view
    which maps to the desired XML document structure.
    * in your query, use cursor subqueries, or cast-multiset
    constructs to get nesting in the XML document which comes from a
    flat schema.&#8221;
    They then have an example how to create an object-relational
    view. But this is done with an empty database, and I already
    have tables with data so I don&#8217;t know how to do this.
    I&#8217;ve tried with some simple subqueris like
    SELECT name, id,
    (SELECT COUNT(*) FROM order o WHERE c.id = o.id) AS
    NumOfOrders
    FROM cust c
    But it adds just another colum.
    Could somebody help me or direct me to some resource, please?
    Thanks!

  • How to convert indesign document's data into the xml file

    Hi all,
    First let me explain what exactly i am trying to do.
    just i want to ge all page items data (type,frame etc ) from a document and i want to convert all those data into my xml structure .
    now i am able to get page item's data from a document . i dont know how to approach it further
    any advise ? how do i approach it?.
    Experts Please help!

    What are you trying to achieve specifically. Did you look into IDML to see if suits your needs?
    Manan Joshi
      - Efficient InDesign Solutions -
    MetaDesign Solutions
    http://metadesignsolutions.com/services/indesign-development.php

  • Generating Deeply nested XML from a flat file

    Hi All,
    I am working on a MQ to IDOC scenario.
    I am getting a flat file as input. I need to convert it into XML( so that XI can understand it).
    But conversion is into a "Deeply Nested XML from a Flat File" at sender side (JMS Adapter).
    Any inputs on this.
    Regards,
    Vikas

    You can only convert flat file into xml structure with 3 levels.
    If you need to convert flat file into deep nested xml structure, you have to do java mapping or xslt or abap mapping. There is a tool, I think it's called conversion agent by itemfield (bought by SAP), which can do pretty everything with conversion. Never used it though.
    Jayson

  • Passing multiple rows of data as an XML input to a transaction

    Hi,
    I have a grid with several rows and columns of data on the front-end UI. I would like to select few rows and pass the data as an XML structure to a transaction. Is this possible? If so, how could I do this?
    Regards,
    Chanti.

    Hello Chanti,
    Yes, Its definitely possible, I have done it on couple of occasions and it has worked
    Option 1:
    1) Pass each row value in a string where each row is separated by a comma as shown,
    Value1,Value2,Value3.....
    2) Then within BLS use it as string input variable and parse it using String_List_To_XML XML action block.
    Option 2:
    1) If you are aware of the required XML structure then prepare one as string by appending reach rows something like as shown below,
         var SpeedXML = "";
         SpeedXML =      '<?xml version="1.0" encoding="utf-8"?>'
         SpeedXML =     SpeedXML + '<Rowsets Version="12.1">'
           SpeedXML =     SpeedXML + '<Rowset>'
         SpeedXML = SpeedXML + '<Columns>'
         SpeedXML =     SpeedXML + '<Column Description="" MaxRange="1" MinRange="0" Name="Average_Run_Speed" SQLDataType="1" SourceColumn="Average_Run_Speed" />'
         SpeedXML =     SpeedXML + '<Column Description="" MaxRange="1" MinRange="0" Name="Line_Stops" SQLDataType="1" SourceColumn="Line_Stops" />'
         SpeedXML =     SpeedXML + '</Columns>'
    Here in this section you can loop through your rows and append them to structure,
    Start Loop
         SpeedXML = SpeedXML + '<Row>'
         SpeedXML = SpeedXML + '<Average_Run_Speed>'+ Value1 +'</Average_Run_Speed>'
         SpeedXML = SpeedXML + '<Line_Stops>'+ Value2 +'</Line_Stops>'
         SpeedXML = SpeedXML + '</Row>'
    End Loop
         SpeedXML = SpeedXML + '</Rowset>'
         SpeedXML =     SpeedXML + '</Rowsets>'
    2) Now in the Transaction, use it as String input variable and parse it using String_To_XML XML action block
    Hope this helps!!
    Regards,
    Adarsh

  • Nested XML dataset: can't see items

    Hi,
    I'm a newbie and started using Spry 1.5 because it looks
    promising and helps me avoid getting into javascript for the
    moment. My XML data looks like
    <lanternsandsconces>
    <lantern>
    <name>1</name>
    <size>
    <description>Standard 1</description>
    </size>
    <size>
    <description>Standard 2</description>
    </size>
    </lantern>
    <lantern>
    <name>2</name>
    <size>
    <description>Standard 1</description>
    </size>
    </lantern>
    </lanternsandsconces>
    I am trying to access the data using Nested XML datasets. I
    tried to mimic your example on
    http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html
    with my XML data. Here's my html:
    <script src="../SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryXMLNestedDataSet.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    var dsTest = new
    Spry.Data.XMLDataSet("../XML/productsnested1.xml","lanternsandsconces/lantern");
    var dsTestNest = new Spry.Data.NestedXMLDataSet(dsTest,
    "size");
    </script>
    <div>
    <table class="dataTable">
    <tr>
    <th>lantern</th>
    <th>sizes</th>
    </tr>
    <tr>
    <td spry:region="dsTest">
    <ul spry:repeatchildren="dsTest" spry:choose="">
    <li spry:when="{ds_CurrentRowNumber} == {ds_RowNumber}"
    spry:setrow="dsTest" spry:select="select" spry:hover="hover"
    spry:selected="">{dsTest::name}</li>
    <li spry:default="" spry:setrow="dsTest"
    spry:select="select"
    spry:hover="hover">{dsTest::name}</li>
    </ul>
    </td>
    <td spry:region="dsTestNest">
    <ul spry:repeatchildren="dsTestNest">
    <li>{dsTestNest::description}</li>
    </ul>
    </td>
    </tr>
    </table>
    </div>
    I would appreciate any help on getting this to work .... As
    you can see it is almost a straight copy and paste from the
    example. I have the proper scripts copied into the SpryAssets
    directory.
    Cheers,
    Huub

    Ah,
    excellent. That indeed works. For future reference: this line
    I actually copied from
    http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WSC0DC5D76-B6F1-41ae-9E59-586A1 19AA7C5.html
    that's where the bug originated. At
    http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html
    it is correct.
    thanks a bunch, JV.
    Cheers,
    Huub

  • XML Data Load into releational structures

    Hi,
    I am very unexperienced in using XML and have the problem
    to import very large XML data files into existing reletional structures.
    In our production DB we don't use the java engine, so
    that PL/SQL an the SQL Loader are the only available ways to import the data.
    At the moment we get flat files and use the SQL Loader utility. But an interface to a new system send XML data now and I have to fill the same old releational structure with the new data.
    Can anybody give me a hint about the best technic for an high performance import. Are there any existing tools for the relational mapping?
    Regards Ralph

    Thank you for your reply.
    You are right. We only want to break the XML to fill our relational structures. We don't need the XML data further on. But we have to load the data in temporary structures, because we have to transform the data in our own format. (The system which delivers the XML data is external and uses another data model)
    Is there no more elegant way with use of databse built in technics? The XML data we get can be validated against a XML schema.
    So I thought, it could be a way to load the XML in the XDB and register the schema in the database. After that store the XML data in the default generated object relational structures and then programm the data transformation and the data flow between these default structures to our target data structures with PL/SQL.
    I don't know if this way is performant enough.
    If I use an external tool i have to code the relational mapping outside the database and insert the data with use of ODBC in temporary structures which i have to create manualy.
    So I hoped to find a way to load the data in any relational structure using the advantages of XML and XML schema and code the neccasary logic inside the DB.
    Do you have any further hints for my problem?
    Regards Ralph

  • Nested XML data set

    Hi there,
    I have a problem with displaying some nested XML data. I've
    tried quite a lot of different approachey to this, but just can't
    get it working properly. So here's the deal:
    I have an XML file (which is dynamically created from a
    servlet) of the form:
    <variations>
    <variation>
    <name>...</name>
    <...>...</...>
    <links>
    <link>
    <type>...</type>
    <name>...</name>
    </link>
    </links>
    </variation>
    </variations>
    On my webpage, I use a Spry tabbed panel with one tab for
    each of the 'variation's in the XML file. Within the tabs I have
    (many) form fields dynamically filled with the values from the XML
    and that all works fine, but I also want to display a table with
    one row corresponding to each 'link'... and that just won't work...
    My latest approach looks something like this:
    <head>
    <script type="text/javascript">
    <!--
    var dsVariations = new
    Spry.Data.XMLDataSet("Servlet?id=1&cmd=getVariations",
    "variations/variation");
    var dsLinks = new
    Spry.Data.XMLDataSet("Servlet?id=0&cmd=getLinks",
    "links/link");
    //-->
    </script>
    </head>
    <body>
    <div id="TabbedPanels1" spry:region="dsVariations">
    <div id="TP1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li spry:repeat="dsVariations" class="TabbedPanelsTab"
    tabindex="0">{dsVariations::name}</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div spry:repeat="dsVariations"
    class="TabbedPanelsContent">
    // a lot of form stuff
    <table border="1">
    <script type="text/javascript">
    dsLinks.setURL("Servlet?id={dsVariations::id}&cmd=getLinks");
    dsLinks.loadData();
    </script>
    <tr spry:repeat="dsLinks">
    <td>{dsLinks::type}</td>
    <td>{dsLinks::name}</td>
    </tr>
    </tr>
    </table>
    </div>
    </div>
    </body>
    In this, the Servlet call with cmd=getVariations returns the
    whole XML stated above, while the cmd=getLinks will only get the
    corresponding part (everything between <links> and
    </links>).
    The error message I get for this is: processTokens() failed
    to get a data set context!.
    I previously tried to use a NestedXMLDataSet, but couldn't
    get that working either... I'm really kind of stuck by now and
    would appreciate any help.
    Thanks,
    Florian
    PS Thanks a lot for creating Spry: It's great!

    Thanks for your reply, Cristian.
    I'm afraid I couldn't do that since it would cause the whole
    region to be reloaded constantly (because it's being updated each
    time I do the setURL / loadData)... in fact, I tried this before
    and it didn't work.
    But, in fact, I figured that the fact that I could not get it
    running using a NestedXMLDataSet (as I would generally prefer), did
    not actually come down to a problem in the page source code, but
    actually to a problem with the very XML itself:
    I tried to recreate the simple nested data set example (
    http://labs.adobe.com/technologies/spry/samples/data_region/NestedDataSample.html)
    and basically used the same code and an almost identical XML
    structure... yet it doesn't work. The contents of dsFeatures just
    won't be displayed and when I'm inspecting the contents of
    dsFeatures (using Firebug) it shows me that the dataset is empty. I
    just don't get why it works for your example, but not for my
    modified version... I can't see any crucial difference :-s.
    To simplify the problem I deleted most tags from the XML and
    saved it in a static document "variations.xml":
    <variations>
    <variation>
    <name>Var 1</name>
    <features>
    <feature>none</feature>
    <feature>feat1</feature>
    <feature>feat2</feature>
    </features>
    </variation>
    <variation>
    <name>Var 2</name>
    <features>
    <feature>none</feature>
    </features>
    </variation>
    </variations>
    The source of the test page would be:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Nested Data Sample</title>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">
    var dsVariations = new Spry.Data.XMLDataSet("variations.xml",
    "/variations/variation");
    var dsFeatures = new Spry.Data.NestedXMLDataSet(dsVariations,
    "features/feature");
    </script>
    </head>
    <body>
    <table border="1">
    <tr>
    <th width="30%"
    onclick="dsVariations.sort('name');">dsVariations</th>
    <th width="30%"
    onclick="dsFeatures.sort('link')">dsFeatures</th>
    <th width="30%">dsVariations + dsFeatures</th>
    </tr>
    <tr>
    <td valign="top"><div
    spry:region="dsVariations">
    <ul>
    <li spry:repeat="dsVariations" spry:select="select"
    spry:hover="hover" spry:setrow="dsVariations"> {name}
    </li>
    </ul>
    </div></td>
    <td valign="top"><div spry:region="dsFeatures">
    <ul>
    <li spry:repeat="dsFeatures"> {dsFeatures::feature}
    </li>
    </ul>
    </div></td>
    <td valign="top"><div spry:region="dsVariations
    dsFeatures">
    <ul>
    <li spry:repeat="dsVariations"> {dsVariations::name}
    <ul>
    <li
    spry:repeat="dsFeatures">{dsFeatures::feature}</li>
    </ul>
    </li>
    </ul>
    </div></td>
    </tr>
    </table>
    </body>
    Evidently, I'm missing some essential simple point here...
    Thanks,

  • Load Data from a table on one server's database, to the same table structure in multiple server databases

    Hi,
    I have a situation where i have to load data from one server/database table to multiple servers/databases.
    Example:
    I need to load data from dbo.TABLE_A  (on Server: Server_A & Database: Database_A)  to the same table on the list of server databases like
    Server: Server_B , Database: Database_B
    Server: Server_C , Database: Database_C
    Server: Server_D , Database: Database_D
    Server: Server_E , Database: Database_E
    Server: Server_F , Database: Database_F
    Server: Server_G , Database: Database_G
    Server: Server_H , Database: Database_H
    so on and so forth on 250 such server database combinations.
    The table structure is the same on all the servers.
    If i make the source or destination dynamic, it throws an error while mapping ?
    I cannot get Linked server permissions and SQL Server Config thing doesn't work as well.
    Please suggest on how to load data from one source to multiple server/databases.
    Thank you.

    I just need to transfer one table's data. its like i have to use a query to pick data for
    the most recent data. So i use something like, select A, B, C, D from dbo.table where ETL_TIMESTAMP > (the max(etltimestamp) in the destination on different server). There are no foreign key relationships and the data should not be truncated. it just had
    to append the new records.

  • Xml data into non-xml database.. solution anyone?

    Hi,
    My current project requires me to store the client's data on our servers. We're using Oracle9i. Daily, I will download the client's data for that day and load it into our database. My problem is that the data file is not a flat file so I can't use sql*loader to load the data. Instead, the data file is an xml file. What is the best way to load xml data into a non-xml database? Are there any tools similar to sql*Loader that will load xml data into non-xml database? Is it the best solution for the client to give me an XML dump of their data to load into our database, or should I request a flat file? My last resort would be to write some sort of a script to parse the xml data into a flat file, and then run it through sql*loader. Is this the best solution? One thing to note is that these files could be very large.
    Thanks in advance.
    -PV

    I assume that just putting the XML file into an
    extremely large VARCHAR field is not what you want.
    Instead, you want to extract data elements from the
    XML and write them to columns in a table in your
    database. Right?Yes. Your assumption is correct.
    It sounds like you already have a script that loads a
    flat file into your database. In that case I would
    write an XSL transformation that converts the client's
    XML into a correctly-formatted flat file.Thank you. I'll look into that. Other suggestions are welcome.

  • Working With Nested XML Data

    Hello,
    I'm doing my best to create a page in Dreamweaver CS4 utilizing Spry datasets and, I hope, a valid nested XML file. What I want to do is use one XML file that provides the content for my nav div and my content div. It would, in essence, display as an outline. When a user clicks on an item in the nav div the content would be displayed. What I'm guessing would work for the XML file would be this format:
    <content>
      <topic name="Elements">   //--this would serve as the nav element and trigger
        <header>Non-editable</header>   //--this would serve as a header in the content area
        <info>
          <detail id="1">CSS, javascript</detail>   //--this would serve as detail under the headers in the content area.
          <detail id="2">Headers</detail>
          <detail id="3">Footers</detail>
          <detail id="4">Areas within navigation panel</detail>
        </info>
      </topic>
    </content>
    I got the idea from this page in Live Docs: Create a Spry nested data set. Also from a Labs page called Nested XML Data Sample. I've been able to make various parts of the page work but I don't know what is broken. My issues are this:
    I once saw but can no longer find a method for preventing redundant display of data. In this case, the nav elements which are attributes in my XML file.
    The details are showing up in my content area. I must be doing the code for the nesting incorrectly.
    I want to then use the details in the content area to trigger spry tooltips, the content for whih would be genereated from an XML file or HTML frags.
    Here is my latest, ill-fated attempt:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Menu - Content Example</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryNestedXMLDataSet.js" type="text/javascript"></script>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryStackedContainers.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var dsContent5 = new Spry.Data.XMLDataSet("navigation/content5.xml", "content/topic", {useCache: false});
    var dsInfo = new Spry.Data.NestedXMLDataSet(dsContent5, "info/detail");
    //-->
    </script>
    </head>
    <body>
    <div id="wrapper">
      <div id="header">
        <h1>CSU Website Clinic</h1>
        <h3>Bill Milhoan, IS&amp;T Technical Trainer</h3>
      </div>
      <div id="content" spry:region="dsInfo">
        <ul spry:repeatchildren="dsInfo">
          <li>{dsContent5::info}</li>
        </ul>
      </div>
      <div class="nav" spry:region="dsContent5">
        <ul spry:repeatchildren="dsContent5" spry:choose="">
          <li spry:when="{dsContent5::ds_CurrentRowID} == {dsContent5::ds_RowID}" spry:setrow="dsContent5" spry:select="select" spry:hover="hover" spry:selected="">{dsContent5::@name}</li>
          <li spry:default="" spry:setrow="dsContent5" spry:select="select" spry:hover="hover">{dsContent5::@name}</li>
        </ul>
      </div>
    </div>
    </body>
    </html>
    Thoughts? My hope is to distill this process so I can teach others how to do it in the hopes that they will find it easier to keep their department/program websites up-to-date.
    Thanks for the help.
    Bill Milhoan
    Cleveland State University

    I apologize, im using Spry XML Data Set. i guess the best way to describe what im trying to do is, i want to use the Non-desctructive filter sample with the Spry Nested XML Data sample. So with my sample xml on my first post and with the same code non-destructive filter is using, im having trouble trying to search repeating nodes, for some reason it only searches the last node of the repeating nodes. Does that make sense? let me know.
    thank you Arnout!

  • How can i query oracle database data to xml file with c++?

    I want query data to xml file directly in my c++ application .
    I know the oracle XSU provide interferce for query data to xml
    file directly.
    But XSU for oracle8i does not support c++.
    I do not know if XSU for oracle9i support c++.
    can you tell me?
    If i do not use XSU to finish my applicayion.
    what interface that oracle provide can help me do my work?
    thank you !

    BTW why do you want to migrate oracle database data to db2 database? Any specific project requirement like Parallel run with Oracle database (e.g data replication)? Or any other issues - Cost? Manageability? Availability? Business requirements?
    Do you need to do a day-to-day data transfer or it is for permanent migration?

  • Correction for Nested XML Data Sample

    I found an error in the sample code on the
    Nested
    XML Data Sample under "Using Nested Data Sets." Line 8 has
    var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
    "toppings");, but it should be
    var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
    "topping"); in order to match the XML file.
    Another suggestion for us newbies would be to have the
    samples start with a comment about any additional scripts we need
    to insert into our files. It took me a long time to realize I
    needed to include
    <script type="text/javascript"
    src="scripts/SpryNestedXMLDataSet.js"></script> with
    the others in the head.
    Thanks for your work!
    Jonathan

    Hi Jonathan,
    Thanks for catching that. I corrected the doc and the change
    will appear when we release 1.5.
    Also, regarding <script> includes sample, yes, we
    should definitely be doing that.
    Thanks!!!
    --== Kin ==--

Maybe you are looking for

  • How to exclude the conditions value from base amount passing to tax procedu

    Hi Experts, I am having 30 conditions in pricing procedure and tax is calculating on amount of 15th condition but now i am that the amount of the tax should exclude the value of 11th 12th 13th 14th and after excluding the value on the rest the tax ne

  • MouseEvent.CLICK Problem i think...

    I am making a game that wil be included in a school project. its a basic shoot the alien type game. My problem is that it will not respond to a mouse click at all. The weired thing is using the same exact code just changing the event to MOUSE_OVER in

  • Has anyone deployed JAX-RPC based webservices on WebLogic8.1

    Hi all... I 've been trying to deploy the jaxrpc based webservices on weblogic8.1/6.1....but its not working...it works fine on tomcat server... so if anyone has deployed and tested the webservices on weblogic successfully...pls help.. thanks khajaM

  • Bc4j.xcfg defaults

    Usually the BC4J.XCFG files only contain few entries which describe differences to some "defaults". In our Project we are using a lot of Application Modules and because of this we have a lot of BC4J.XCFG Configurations. Most of our ApplicationModules

  • Collaboration Room Calendar

    Hello, been banging my head against a wall here and my eyes are blurry from reading docs and forum posts and everything. We have Lotus Notes and we set our Systems up and connected to our Lotus server. If I just add the iview using my system alias to