Joint Queries

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

Guest

Hi,

How can I create a query that will merge two queries? In order words, how can I join two different queries?

Thanks
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There has to be columns in both queries that can be referred to by both
queries. E.g.:

Qry1:
SELECT EmployeeID, StartDate
FROM Employees
WHERE BirthDate = #2/3/1984#

Qry2:
SELECT EmployeeID, Count(*) As SalesCount
FROM Sales
WHERE SalesDate >= #1/1/2000#
GROUP BY EmployeeID

Qry3:
SELECT E.EmployeeID, E.StartDate, S.SalesCount
FROM Qry1 As E INNER JOIN Qry2 As S
ON E.EmployeeID = S.EmployeeID

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQREuBIechKqOuFEgEQKvNgCglQJZckyotHbNLli4Zgoahh1xEzUAoLYn
Kfd140kGiOFOnqU9nnDwpI02
=HdOP
-----END PGP SIGNATURE-----
 
Back
Top