May 6, 2004 at 2:02 am
Hi All
First post here/ I have an XML file which I need to read into SQL Server 2000, compare to existing table values and then return an XML file of only those columns that are different.
Anyone any pointers or a small example script that I can use to get started.
May 6, 2004 at 7:56 am
xml to a temp table, sql comparison and select result out.
May 7, 2004 at 12:19 pm
The thing with xml to temp table is T-SQL is unable to read xml file directly. As far as I know, ADO has capability to open an xml file. You create an ADO recordset object, open it by reading the xml file, then create the temp table in SQL Server, open the table using ADO recordset, then call AddNew to the temp table record by record.
Are there any other ways to read an xml file to temp table?
May 8, 2004 at 12:25 am
Use the XmlBulkLoader from the SqlXml3.0 to load your data into temp table, compare and use FOR XML AUTO|EXPLICIT|RAW to return the result back out as xml.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply