Link to home
Create AccountLog in
Avatar of George_Milton
George_MiltonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access query Help

Hi
I have a table that contains 2 fields that I need to be able to compare and return results
Field 1 is Country
Field 2 is Country event
The fields contain country codes, for example GB, USA, GER and so on.
What I want to do is for access to check this 2 fields, if either field contains GB then return the data
So for example Field1 Contains GB Field2 Contains GER, the data should be returned. Like wise is Field1 Contains GER and Field2 Contains GB then data should be returned. If GB is present in both fields then data should also be returned.
If Field1  Fields2 both do not contain GB data should not be returned so Example Field1 GER Field2 USA do not return data

Hope that makes sense, I suspect it is simple but just cant get the query to pull all the data

Thank
Michael
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Try this:

SELECT * FROM YourTable
WHERE Country = "GB"
OR [Country Event] = "GB"
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of George_Milton

ASKER

Worked like a treat