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!

exclusion in access queries? (caret symbol usage?)

Status
Not open for further replies.

MBresnan

Technical User
Jun 23, 2010
47
US
Is there a way to use a caret symbol (or something) to exclude data in a query in MS Access? I need to return a range of 5 digit numerical results, but NOT where the 3rd digit is a 5. So for example, if i had: [33300, 33500, 35000, 34500, 36000, 36500, 37000, 37500] in my dataset, and i want to return all the values between 34000 and 37000, but NOT 34500 and 36500. Is there a way to do this formulaically? I'm working with a much bigger dataset, and i really don't want to make a bunch of 'between' statements.
 
Wouldn't that be just simple:

Code:
WHERE ....
AND Mid(YourField, 3, 1) <> 5

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top