select query with multiple fields (1 Viewer)

microwize

New member
Local time
Today, 20:28
Joined
Nov 8, 2001
Messages
5
I'm trying to write a query that will yield all records where a TechnicianID appears. Please note that the Technician ID could be in any one of three possible fields.

Your help is appreciated.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:28
Joined
Feb 19, 2002
Messages
43,365
If you are using the QBE grid to build the query, put each condition on a separate line so that the conditions will be connected by an OR in the generated SQL. All conditions on a single line are connected with AND's.

Your SQL will end up looking like:

Where TechnicianID1 = 123 or TechnicianID2 = 123 or TechnicianID3 = 123;
 

microwize

New member
Local time
Today, 20:28
Joined
Nov 8, 2001
Messages
5
Thanks Pat. Works like a charm
 

Users who are viewing this thread

Top Bottom