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 |
magmo
Aged Yak Warrior
558 Posts |
Posted - 2011-06-09 : 13:37:16
|
HiI have a xml column that is filled with xml data that is missing root elements, how can I add this to an exsisting stored procedure where I want to return the modified xml string? I tried this but it does not work., ('<root>' + dbo.TestTable.XmlInfo + '</root>') |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-09 : 13:52:37
|
Is it giving you an error message, or is it giving the wrong data? You may need to cast it to the correct data type at each stage, for example, like this:cast('<root>' + cast(dbo.TestTable.XmlInfo as nvarchar(max)) + '</root>' as xml) |
 |
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2011-06-09 : 14:02:24
|
HiThe cast made the trick, thank you very much! |
 |
|
|
|
|