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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

And and or query

Status
Not open for further replies.

badger8

MIS
Aug 3, 2001
34
US
I'm trying to create a starter query, so that all other queries that I make in the future would use this query but with some addtional criteriab.

Here is what I want to include within my starter gtoup:

Following are the columns that I do not want null:
First_Name
Last_Name
Account
Address1
City
Postal

All records that have within the Account_Industry column Univ* or instrument man* I do not want.

All records with the Account like univ* I do not want.

All records within the Title column that contains *sales* or *marketing* I do not want.

Just records that have a country usa or canada.


I just can not create a starter query that incorporates all the above. I guess I don't fully inderstand the and/or's.

Could someone show me how I would go about in creating a starter group that would incorporate all above?

Thank you.

I need help fast. I'm only a beginner, but I need to learn fast.
 
if all these fields are in 1 table then

select First_Name,Last_Name,Account,Address1,City,Postal
from yourtablename
where Account_Industry not like "Univ*" or Account_Industry not like "instrument man*" and Account not like "univ*" and [Title] not like "*sales*" or [Title]not like "*marketing*" and country in ("usa","canada")



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top