question

steppe avatar image
steppe asked

bulk with variable

I've got this Procedure: it runs well, but when i want to get the xml-File in the Bulk as a variable i don't get it run... and I don't know how I can solve this with an EXEC??? Any ideas?? Thanks! Steppe DECLARE @docHandle int DECLARE @xmlDocument xml -- or xml type SET @xmlDocument =(SELECT * FROM OPENROWSET( BULK 'C:\Users\WST\Desktop\Job_Revit\Import\ATPSheet1.xml', SINGLE_BLOB) AS x) EXEC sp_xml_preparedocument @docHandle OUTPUT, @xmlDocument -- Use OPENXML to provide rowset consisting of customer data. INSERT PLA_ELEMENT SELECT * FROM OPENXML(@docHandle, '/FILE_EXPORT/PLA_ELEMENT',2) WITH PLA_ELEMENT --Use OPENXML to provide rowset consisting of order data. EXEC sp_xml_removedocument @docHandle
xmlbulkopenxml
2 comments
10 |1200 characters needed characters left characters exceeded

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

What error messages are you receiving, if any?
0 Likes 0 ·
Also, we would require a sample of your xml file.
0 Likes 0 ·

0 Answers

· Write an Answer

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.