I would like to use a stored procedure to insert some values passed in as parameters into elements in the xml of a column. I have this so far The following parameters:
Try this
declare @ins xml
''+
@activity_name+
' '
+@display_name+
' '
SET @devices_xml.modify('
insert sql:variable("@ins") into (/Profile[ID=sql:variable("@user_id")]/User/Activities)[1]')
Or
SET @devices_xml.modify('
insert
{sql:variable("@activity_name")}
{sql:variable("@display_name")}
into (/Profile[ID=sql:variable("@user_id")]/User/Activities)[1]' )