0

With the table below...what would the replace (or delete/insert) look like if I wanted to completely replace the contents of the xml column with something else...there would no similar nodes in common however I need the PK i to stay intact

CREATE TABLE T (i int, x xml)
go
INSERT INTO T VALUES(1,'<Root>
<ProductDescription ProductID="1" ProductName="Road Bike">
<Features>
 <Warranty>1 year parts and labor</Warranty>enter code here
 <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
/Root>')
Bayrat
  • 161
  • 1
  • 3
  • 17

1 Answers1

0
update t
set x='<Root>
<ProductDescription ProductID="1" ProductName="Road Bike v2">
<Features>
<Warranty>1 year parts and labor</Warranty>enter code here
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
/Root>'
where i=1
Chris Allen
  • 605
  • 3
  • 4