Combining Fields in A Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table in which I have created the following fields:
"NewTechnician", "Tech2", and "Tech3". I also have a field called
"WorkDate". I am wanting to create a query which will select all Technicians
which have a work date assigned for today ( Date() ). I am able to create a
query which will select the technicians which have work scheduled for today.
However I would like now to group the technicians from "NewTechnician",
"Tech2" and "Tech3" into one common field called "TodaysTech". Is this
possible and how would it be done?
Thanks
Michael
 
Use a Union query. You can't create Union queries through the GUI query
designer. You'll need to go into the SQL view, where you can type something
like:

SELECT NewTechnician AS TodaysTech
FROM MyTable
WHERE Workdate = Date()
UNION
SELECT Tech2 AS TodaysTech
FROM MyTable
WHERE Workdate = Date()
UNION
SELECT Tech3 AS TodaysTech
FROM MyTable
WHERE Workdate = Date()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top