Union Query? Help required***

Scott_Withey

Registered User.
Local time
Today, 18:11
Joined
Jul 30, 2004
Messages
14
Hi,

I've quite pleased that I've been able to create a good recruitment database (well with alittle help from my friends on this forum and the occasional help book. However now I have aproblem

Basically I have these two tables tblArchiveNFA and tbl Application, from which I need to produce a report. This report is a breakdown and is grouped by a particular field.

I tried creating two separate queries based on each table, and then used another query to total these ones up. However this doesn't seem to work.

I don't think i've explained myself very well here but I would be grateful for an advice. I don't know how to write in SQL.

If it would help for me to put a copy of the database on here let me know

Cheers

Scott
 
Sounds like you want a union query:

Select * from qry1
Union Select * from qry2
Union Select * from qry3;

In a union query, each separate select needs to select the same number of columns in the same order and the datatypes need to be the same. So if qry1 selected fldA, fldB, fldC and qry2 selected fldB, fldA, fldC - the query would not work properly. Or if fldA from qry1 and fldA from qry2 were different data types the query wouldn't work.
 

Users who are viewing this thread

Back
Top Bottom