Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Can you transform XML into a SQL INSERT statement

From: Ant@-----------.---------.---
To: NULL
Date: 6/26/2008 1:00:00 AM

Many thanks Joe. 

Basically I need to Insert one row for every attribute value in each detail 
node.

Please see the snippet below. If you need the rest of the xml, just let me 
know

Much appreciate it.

<subDetail>
<subDetailHeader xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" 
xfa:dataNode="dataGroup" />
    <detail>
        <ItemDescription>March Maintenance</ItemDescription>
        <ItemPrice>8500.00000000</ItemPrice>
        <Currency>JPY</Currency>
        <ItemQuantaty>1.00000000</ItemQuantaty>
        <ItemCost>8500.00000000</ItemCost>
        <Currency>JPY</Currency>
     </detail>
     <detail>
         <ItemDescription>April Maintenance</ItemDescription>
         <ItemPrice>9000.00000000</ItemPrice>
         <Currency>JPY</Currency>
         <ItemQuantaty>1.00000000</ItemQuantaty>
         <ItemCost>9000.00000000</ItemCost>
         <Currency>JPY</Currency>
       </detail>
       <detail>
          <ItemDescription>May Maintenance</ItemDescription>
          <ItemPrice>8500.00000000</ItemPrice>
          <Currency>JPY</Currency>
          <ItemQuantaty>1.00000000</ItemQuantaty>
          <ItemCost>8500.00000000</ItemCost>
          <Currency>JPY</Currency>
       </detail>

etc....

"Joe Fawcett" wrote:

> 
> 
> "Ant" <Ant@d...> wrote in message 
> news:9B4CCC8D-8C8A-419D-BFAF-3B28435C3218@m......
> > Hi,
> > Is it possible to use XSLT to transform xml data into an insert statement
> > with xslt?
> >
> > Many thanks for any ideas on this
> >
> > @nt
> Of course, you will need to use <xsl:output method="text" />. It's something 
> I've done in the past and something similar to what SQL Server does anyway 
> if you use the datagram update feature.
> If you show an example of the XML you receive we can help further.
> 
> -- 
> 
> Joe Fawcett (MVP - XML)
> http://joe.fawcett.name 
> 


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent