Hi,
I'm bulking an xml file using BULK statement to an XML variable, like this:
I'm trying to set 'D:\root.xml' to be a paramater @filepath. But I'm getting a parsing problem, that it expects to be string or Text-LEX..!!
Here is what I did:
Thanks in advanced!
I'm bulking an xml file using BULK statement to an XML variable, like this:
Code:
DECLARE @xmlDoc XML SET @xmlDoc = ( SELECT * FROM OPENROWSET ( BULK 'D:\root.xml', SINGLE_CLOB ) AS xmlData ) SELECT @xmlDoc
Here is what I did:
Code:
( @filepath nvarchar(255) ) SET @xmlDoc = ( SELECT * FROM OPENROWSET ( BULK @filepath, SINGLE_CLOB ) AS xmlData ) SELECT @xmlDoc
Comment