Prakash V
2006-12-07 10:58:25 UTC
Hi,
I have a stored procedure which gets an xml string and a Id
i have to insert the xml into stuctured xml column with in the element with
the given id.
I tried like this, but i got an error -- XQuery
[HSStructure.XMLStructure.modify()]: An expression was expected.
Declare @var xml,@Id int
Set @var =N'<Node Id="2" Type="1">
<Node Id="3" Type="2">
</Node>
</Node>'
Set @count=1
UPDATE TBL_Structure
SET Structure.modify('insert {sql:variable("@var")} into
//Node[@Id="{sql:variable("@Id")}"]')
What i have to do it to make it work.
Thanks,
Prakash.V
I have a stored procedure which gets an xml string and a Id
i have to insert the xml into stuctured xml column with in the element with
the given id.
I tried like this, but i got an error -- XQuery
[HSStructure.XMLStructure.modify()]: An expression was expected.
Declare @var xml,@Id int
Set @var =N'<Node Id="2" Type="1">
<Node Id="3" Type="2">
</Node>
</Node>'
Set @count=1
UPDATE TBL_Structure
SET Structure.modify('insert {sql:variable("@var")} into
//Node[@Id="{sql:variable("@Id")}"]')
What i have to do it to make it work.
Thanks,
Prakash.V