how can i combine two query result side by side

  • Thread starter Thread starter mezzanine1974
  • Start date Start date
M

mezzanine1974

lets say we have two queries, Q1 and Q2. Suppose that both query is to
produce same number of row as a result. Is it possible to produce a
table (or query result) which combines the results of Q1 and Q2 as two
different field, side by side ?
 
Just join them together, the way you would if they were tables.

The SQL would look something like:

SELECT Q1.ID, Q1.Field1, Q1.Field2, Q2.Field1, Q2.Field2, (Q1.Field2 =
Q2.Field2) AS Same
FROM Q1 INNER JOIN Q2
ON Q1.ID = Q2.ID
 
Back
Top