Friday, February 24, 2012

Import a XML file..?

Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.Do you want the XML to be imported relationally? That is, into separate
tables?
Or do you just want to store the xml as text
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
> Hi all,
> I'm new to XML.
> How can I import a XML-file to a SQL-table?
> /Kent J.
>
>|||Jeff,
The XML-file consists of data about our customers - Customernumber,Address,
PhoneNumber and so on.
I would like the data to be stored in a single SQL-table.
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> Do you want the XML to be imported relationally? That is, into separate
> tables?
> Or do you just want to store the xml as text
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:FStgd.7428$d5.62954@.newsb.telia.net...
>|||Look in Books Online under Writing XML using OPENXML
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:pDugd.7430$d5.63053@.newsb.telia.net...
> Jeff,
> The XML-file consists of data about our customers -
Customernumber,Address,
> PhoneNumber and so on.
> I would like the data to be stored in a single SQL-table.
> /Kent J.
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
>|||Check out:
http://msdn.microsoft.com/library/d... />
ql01c5.asp
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.|||OK! I have read 'Writing XML Using OPENXML'
I understand that I first have to prepare the document with:
sp_xml_preparedocument
and then run....
OPENXML
But I'm not closer to solve the problem.
Can you describe how to import a XML-file into a SQL-table in a step-by-step
instruction?
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> Look in Books Online under Writing XML using OPENXML
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:pDugd.7430$d5.63053@.newsb.telia.net...
> Customernumber,Address,
separate[vbcol=seagreen]
>|||The docs have working examples..did you get one of those working' They are
very similar to your requirements.
You are familar with INSERT vs SELECT, correct?
Sorry, but I won't write the code for you. If you have a specific question,
I would be happy to assist.
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> separate
>|||You might want to venture to http://sqlxml.org for great info.
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> separate
>

No comments:

Post a Comment