日期:2014-05-16 浏览次数:20334 次
update customer set info =''where xmlexists (declare default element namespace ".org";$doc/customerinfo[@Cid=222])
UPDATE customer set info = xmlquery('transform copy $mycust:=$cust modify do replace $mycust/customerinfo/addr with <addr country="Canada"> <street>25 eastcreek</street> <city>a</city> </addr> return $mycust' passing info AS "cust")WHERE CID = 1005
UPDATE customer set info = xmlquery('transform copy $mycust:=$cust modify do insert <phone type="home"> 1111111111 </phone> after $mycust/customerinfo/phone return $mycust' passing info as "cust")WHERE CID = 1000
UPDATE customer set info = xmlquery('transform copy $mycust:=$cust modify for $phone in $mycust/customerinfo/phone return do rename $phone as "phonenumber" return $mycust' passing info as "cust")WHERE CID = 1004
UPDATE customer set info = xmlquery('transform copy $mycust:=$cust modify do delete ($mycust/customerinfo/phone[@type="home"]) return $mycust' passing info as "cust")WHERE CID = 1000