Solved

DELETE QUERY QUESTION - EASY

Posted on 2008-10-08
2
165 Views
Last Modified: 2012-05-05
Simply put, I need to know how to implement a DELETE query within my SPROC that basically deletes ANY row WHERE GPS.TEXT_MESSAGE DOES NOT = '*Dispatched' or '*Starting Trip' or '*Ending Trip'

0
Comment
Question by:chrisryhal
2 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22670562
Here you go:

delete from gps
where YourPrimaryKeyField not in
     (select YourPrimaryKeyField from gps where texT_message in ('*Dispatched','*Starting Trip', '*Ending Trip')
     )
0
 
LVL 2

Author Closing Comment

by:chrisryhal
ID: 31504308
PERFECT!!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

19 Experts available now in Live!

Get 1:1 Help Now