Hi Sir, I am trying to get xml data from xml file into MS SQL DB. For this I use following code in SP. SET @XDoc = ( SELECT * FROM OPENROWSET (BULK @VCnfVal, SINGLE_CLOB ) AS xmlData) Please note that I want @VCnfVal as one variable and not hard-coded. Below code works fine but code 1 fails. Please let me know how to use the xml variable path instead of one fixed value of the xml path. SET @XDoc = ( SELECT * FROM OPENROWSET (BULK 'Cocuments and SettingssheetalDesktop', SINGLE_CLOB ) AS xmlData)
http://www.devarticles.com/c/a/XML/...om-within-SQL-Server-2000-using-Managed-Code/ http://msdn2.microsoft.com/en-us/library/ms139886.aspx FYI.
The original script probably doesn't work because functions like OPENROWSET do not accept variables as parameters, only fixed strings. The work-around for that is to do these calls as dynamic SQL. But this is the 2005 Integration Services forum, so stick to other people's advice.
SSIS, all types of data (structured, unstructured, XML, etc.) are converted to a tabular (columns and rows) structure before being loaded into its buffers. Any data operation that can be applied to tabular data can be applied to the data at any step in the data-flow pipeline. This means that a single data-flow pipeline can integrate diverse sources of data and perform arbitrarily complex operations on these data without having to stage the data.