Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

xml modify sql 2008

Posted on 2012-03-09
2
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

721 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