Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

xml modify sql 2008

Posted on 2012-03-09
2
Medium Priority
?
313 Views
Last Modified: 2012-03-11
say i have a table that has 2 column 1 is id and other is xml data

i inserted
1, xml<test><q1></q1></test>

now i inserted
2, xml<test><q1></q1><q2></q2></test>

how do i detect to say 2 and 1 are really the same let me just add q2 into row 1 and delete row 2 using xml modify
0
Comment
Question by:StewSupport
2 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 37705298
How are you receiving the original information? Is it coming in as XML or are you converting it before insert? Your responses will help shape the final solution, but it will utilize XML.exist() method: http://msdn.microsoft.com/en-us/library/ms189869.aspx

I think if combined with with a WHERE NOT EXISTS can help yield the behavior you need.
0
 

Author Closing Comment

by:StewSupport
ID: 37708090
i found my answer before this post so i didn't try this i am using xml.modify. thanks
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question