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
Solved

Query XML in a database table

Posted on 2014-04-29
4
214 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

789 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