|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, February 15, 2013 5:02 AM
Points: 2,
Visits: 13
|
|
SET @PreviousAddress = @xmlfile // Xml File With Tag i.e UPDATE TableName SET ColummnName.modify(' insert ( sql:variable("@PreviousAddress") ) after (/NewDataSet[1]) ') WHERE Condition here SELECT '0'
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 1:18 AM
Points: 1,722,
Visits: 1,402
|
|
I think you may need to provide a little more information on what you are trying to do, sample code and what issues/errors that you are seeing. Showing an example xml structure of what you are trying to get to or what is going wrong etc.
I've had a look at the query itself and it "looks" ok from a syntax point of view.
Are you trying to insert an xml node into an existing xml node like the following rather than appending it at the bottom of the xml structure?
DECLARE @xml XML SET @xml = '<NewDataSet></NewDataSet>'
DECLARE @PreviousAddress XML SET @PreviousAddress = '<PreviousAddress>asdfadsF</PreviousAddress>'
SET @xml.modify('insert (sql:variable("@PreviousAddress")) as first into (/NewDataSet)[1]')
SELECT @xml
|
|
|
|