Solved

Query XML in a database table

Posted on 2014-04-29
4
213 Views
Last Modified: 2014-04-29
Hi,
I need to query a column in a database containing XML, I would like to delete all rows that do not contain the word Receipt in the XML?
could someone help with this please?

Regards,
Atorex
0
Comment
Question by:atorex
  • 3
4 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 40030181
DELETE FROM <your table>
WHERE <your column>   NOT LIKE '%receipt%'
0
 
LVL 22

Accepted Solution

by:
plusone3055 earned 500 total points
ID: 40030186
DELETE FROM <your table>
WHERE <your column>   NOT LIKE '%receipt%'
0
 

Author Closing Comment

by:atorex
ID: 40030258
thanks, I used the not like but did not use the %, knowledge is a beautiful thing!

thanks.
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40030276
no problem have a great day
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

803 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