R
ryguy7272
Sorry if this is a simple question and just silly, but I am really missing
something here. I have two union queries. The first union query is in the
format that I want, with all the headings set up just fine. The second union
query has all the data I need, but contains a few extra columns. In am using
a select query to eliminate a few unnecessary columns in the second union
query, and get the data in a format that will match the results of the first
union query (I ultimately want to combine the first union query with the
second union query). The problem seems to be with the select query
eliminating several records from the second union query. I can’t figure out
why the select query will truncate many records (102 total). Does anyone
know how to overcome this? Somehow I need to force all records to flow
through from the second union query to the select query.
I’ve used ‘SELECT *’ and I’ve used ‘Union All’ in the past and these have
worked fine in other instances. These don’t seem to work in this instance.
Here is my SQL:
SELECT qryUnionAdvJoilet.RVP, qryUnionAdvJoilet.Director,
qryUnionAdvJoilet.[Sales Rep], qryUnionAdvJoilet.[Related Company],
qryUnionAdvJoilet.[Class 1], qryUnionAdvJoilet.[Class 2],
qryUnionAdvJoilet.Quarter, [Quarter] & "Pipe" AS Source
FROM qryUnionAdvJoilet
GROUP BY qryUnionAdvJoilet.RVP, qryUnionAdvJoilet.Director,
qryUnionAdvJoilet.[Sales Rep], qryUnionAdvJoilet.[Related Company],
qryUnionAdvJoilet.[Class 1], qryUnionAdvJoilet.[Class 2],
qryUnionAdvJoilet.Quarter;
TIA,
Ryan---
something here. I have two union queries. The first union query is in the
format that I want, with all the headings set up just fine. The second union
query has all the data I need, but contains a few extra columns. In am using
a select query to eliminate a few unnecessary columns in the second union
query, and get the data in a format that will match the results of the first
union query (I ultimately want to combine the first union query with the
second union query). The problem seems to be with the select query
eliminating several records from the second union query. I can’t figure out
why the select query will truncate many records (102 total). Does anyone
know how to overcome this? Somehow I need to force all records to flow
through from the second union query to the select query.
I’ve used ‘SELECT *’ and I’ve used ‘Union All’ in the past and these have
worked fine in other instances. These don’t seem to work in this instance.
Here is my SQL:
SELECT qryUnionAdvJoilet.RVP, qryUnionAdvJoilet.Director,
qryUnionAdvJoilet.[Sales Rep], qryUnionAdvJoilet.[Related Company],
qryUnionAdvJoilet.[Class 1], qryUnionAdvJoilet.[Class 2],
qryUnionAdvJoilet.Quarter, [Quarter] & "Pipe" AS Source
FROM qryUnionAdvJoilet
GROUP BY qryUnionAdvJoilet.RVP, qryUnionAdvJoilet.Director,
qryUnionAdvJoilet.[Sales Rep], qryUnionAdvJoilet.[Related Company],
qryUnionAdvJoilet.[Class 1], qryUnionAdvJoilet.[Class 2],
qryUnionAdvJoilet.Quarter;
TIA,
Ryan---