question

focus10 avatar image
focus10 asked

export xml data to file

checking thee xml file i exported arise the following error: "Element type “P” must be followed by either attribute specifications, “>” or "/>"(checked by a xml editor) here is the code i used: IF OBJECT_ID('ClientInfo') IS NOT NULL DROP TABLE ClientInfo; GO CREATE TABLE ClientInfo ( ClientID INT PRIMARY KEY IDENTITY, xml_data XML ); INSERT INTO ClientInfo (xml_data) VALUES ( ' John Doe Jane Doe ' ); declare @xml_convert nvarchar(4000) set @xml_convert='bcp "select xml_data from ClientDB.dbo.ClientInfo" queryout C:\Test\1.dat -S '+@@servername+' -T -w -t;' EXEC master..xp_cmdshell @xml_convert what is wrong?
xml
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.