Solved

xml modify sql 2008

Posted on 2012-03-09
2
303 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 59

Accepted Solution

by:
Kevin Cross earned 500 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now