troubleshooting Question

SQL - query to remove ID that has been contacted

Avatar of Jasmin01
Jasmin01Flag for South Africa asked on
Microsoft SQL ServerSQL
5 Comments1 Solution187 ViewsLast Modified:
I have a table in a SQL database that stores the number of times a client is contacted.

It looks similar to this:

ID           Date               Status
1001       2014-05-01     Not Contacted
1001       2014-05-02     Not Contacted
1001       2014-05-04     Contacted
1005       2014-05-04     Not Contacted
1005       2014-05-05     Contacted
1007       2014-05-07     Not Contacted
1007       2014-05-08     Not Contacted
1009       2014-05-08     Not contacted

I want to select only those ID's that have not been contacted, so if you look at my example. ID 1001 has been attempted 3 times. but since t has been contacted, I want to exclude it.  ID 1007 and 1009 have not been contacted so those are the only 2 I want to return.  Any ideas on how to do this?
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros