S
Slez via AccessMonster.com
I need to pull data from 2 queries together for a report, and based on alot
of searching and reading previous posts it sounds like a UNION query is the
route I should go. I haven't gotten it to work yet, and could use some
guidance.
qryNoBidTotal returns the following records (as an example):
[GCName] [NoBidQty]
Customer A 5
Customer C 1
Customer D 2
Customer G 1
qryStatClient returns these records (there are a number of add'l
fields/columns, but no need to post):
[GCName] [Project]
Customer C Proj 1
Customer C Proj 2
Customer E Proj 3
Customer F Proj 4
Customer G Proj 5
I want to combine them to achieve the following:
[GCName] [NoBidQty] [Project]
Customer A 5
Customer C 1
Customer C Proj 1
Customer C Proj 2
Customer D 2
Customer E Proj 3
Customer F Proj 4
Customer G 1
Customer G Proj 5
In qryStatClient, I tried typing the word "UNION" after the SQL and pasting
the SQL from qryNoBidTotal, but when I run the query, I get an error stating
that an operator is required between the end of the first query's SQL and
UNION. Am I going about this the right way? I can post SQL if this is an
achievable goal. Feedback is appreciated! Thanks!
Slez
of searching and reading previous posts it sounds like a UNION query is the
route I should go. I haven't gotten it to work yet, and could use some
guidance.
qryNoBidTotal returns the following records (as an example):
[GCName] [NoBidQty]
Customer A 5
Customer C 1
Customer D 2
Customer G 1
qryStatClient returns these records (there are a number of add'l
fields/columns, but no need to post):
[GCName] [Project]
Customer C Proj 1
Customer C Proj 2
Customer E Proj 3
Customer F Proj 4
Customer G Proj 5
I want to combine them to achieve the following:
[GCName] [NoBidQty] [Project]
Customer A 5
Customer C 1
Customer C Proj 1
Customer C Proj 2
Customer D 2
Customer E Proj 3
Customer F Proj 4
Customer G 1
Customer G Proj 5
In qryStatClient, I tried typing the word "UNION" after the SQL and pasting
the SQL from qryNoBidTotal, but when I run the query, I get an error stating
that an operator is required between the end of the first query's SQL and
UNION. Am I going about this the right way? I can post SQL if this is an
achievable goal. Feedback is appreciated! Thanks!
Slez