Solved

Query XML in a database table

Posted on 2014-04-29
4
208 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
Comment Utility
DELETE FROM <your table>
WHERE <your column>   NOT LIKE '%receipt%'
0
 
LVL 22

Accepted Solution

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

Author Closing Comment

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

thanks.
0
 
LVL 22

Expert Comment

by:plusone3055
Comment Utility
no problem have a great day
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

743 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

14 Experts available now in Live!

Get 1:1 Help Now