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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-30 : 08:52:01
|
| James Agnew writes "Hello allI'm trying to insert an xml node containing a dynamically generated value in SQL Server 2005.Here's what I've got so far:declare @x nvarchar(100)set @x = 'abc123'UPDATE tbl_treeSET theTree.modify('replace value of (/tree[1]/branch[1]/@name) with @x')This doesn't work of course because it expects "" around the value that is being added (@x)I've tried creating a string such as@str='replace value of (/tree[1]/branch[1]/@name) with '+@xand EXEC() it but that still doesn't work.Any ideas?Thanks, James" |
|
|
|
|
|