Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Nader
Starting Member
41 Posts |
Posted - 2010-05-03 : 17:11:04
|
Please can you help me fix this error messagedeclare @filename nvarchar (100)declare @mysql nvarchar (500)declare @PersonXML xmldeclare @ParamDefinition nvarchar(max)set @filename='C:\GoThruFiles\Person.xml'set @mysql=N'select @PersonXML= CONVERT(xml, BulkColumn, 2) FROM OPENROWSET(Bulk '''+ @filename+''', SINGLE_BLOB) [rowsetresults]' select @mysql Set @ParamDefinition = '@filename nvarchar(max)' Execute sp_Executesql @mySql, @ParamDefinition,@filenameI am getting an error messageMust declare the scalar variable "@PersonalXML".I want to set the value of @PersonalXML to the content of the file 'C:\GoThruFiles\Person.xml' |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-05-04 : 04:16:38
|
you have declare the variable in @paramdefinition of type output to get value back------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|