Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query leaving out specific data

Status
Not open for further replies.

aw23

Programmer
Nov 26, 2003
544
IL
I just have a quick question on sql syntax. I'd like to select * from table where source="home" and date=#1/26/2005#

except for several id's 1,2,3,4 (except that they are not consecutive and not in the begining or end)

Is there some sort of 'except' clause?
Thanks!
 
SELECT *
FROM yourTable
WHERE source='home' AND [date]=#1/26/2005#
AND ID NOT In (1,2,3,4)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top