Solved

Query XML in a database table

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

920 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

15 Experts available now in Live!

Get 1:1 Help Now