From varchar(max) to xml
- From: "psychodad71 via SQLMonster.com" <u2248@uwe>
- Date: Fri, 23 Jun 2006 11:00:56 GMT
I have a table with 2 columns. Column a(varchar(max)) and column b(xml).
Column a contains the following data:
Col1;Col2
New York;USA
Rio;Brasil
Tokio;Japan
The first line contains the column header, the following the data.
The data should be transferred to column b with the following xml-structure:
<Col1>New York</Col1><Col2>USA</Col2>
<Col1>Rio</Col1><Col2>Brasil</Col2>
<Col1>Tokio</Col1><Col2>Japan</Col2>
The number of columns and the column names are various.
Any ideas?
Thanks psychodad71
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-xml/200606/1
.
- Follow-Ups:
- Re: From varchar(max) to xml
- From: Dan Sullivan
- Re: From varchar(max) to xml
- From: Peter Flynn
- Re: From varchar(max) to xml
- From: Mike C#
- Re: From varchar(max) to xml
- From: Denis Ruckebusch [MSFT]
- Re: From varchar(max) to xml
- Prev by Date: Re: use XML to store custom metadata
- Next by Date: Re: Recognizing XML in a data table.
- Previous by thread: RE: QueryInterface for interface SQLXMLBULKLOADLib.ISQLXMLBulkLoad fai
- Next by thread: Re: From varchar(max) to xml
- Index(es):
Loading