Click here to Skip to main content
14,882,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
How to insert xml file in sql table

i tried this

SQL
INSERT HPN_CQM_XMLData(XMLData)
SELECT CONVERT(xml, BulkColumn, 2) FROM
  OPENROWSET(Bulk 'D:\test.xml', SINGLE_BLOB) [rowsetresults];




But it showing error

Msg 4860, Level 16, State 1, Line 1
Cannot bulk load. The file "D:\test.xml" does not exist.

while my file is exist in this path
Posted
Comments
Kornfeld Eliyahu Peter 23-Sep-14 6:12am
   
Maybe that D: drive is one of your local disks where SQL runs on the server with no D: or no file!
George Jonsson 23-Sep-14 7:51am
   
The OP didn't reply to your comment, but added a new comment.
srishti_ 23-Sep-14 6:50am
   
ok then what should do for that
Kornfeld Eliyahu Peter 23-Sep-14 7:56am
   
1. Move your file to the server
2. Share your file so server should see it anyway

1 solution

Hey check these links, i guess you will find what you are looking for,
http://support.microsoft.com/kb/316005[^]
http://www.c-sharpcorner.com/Blogs/7125/[^]
:)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900