Solved

DELETE QUERY QUESTION - EASY

Posted on 2008-10-08
2
167 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

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

786 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