By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Sum records from multiple queries

P: n/a
Hi

Need your expert help on the following

i have a table with the following records
EMP ID
Req No
Candidate name 1
candidate status 1
candidate name 2
candidate status 2
and so on for 5 candidates

the statusof each candidate is either owned,reviewed or rejected
i have managed to write a query which gives me the emp id wise record
for each candidate status

i,e, EMPID,candidate 1 status,count of candidate name

i am able to get the query to display the "candidate1status" as
"1001",Owned,4
"1001",Rejected,3
"1001"Reviewed,5

My question is how do i combine the status of multiple candidates to
show the total of the candidate's status i.e, sum of owned,rejected and
reviewed from the candidate status of all 5 candidates

Nov 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Try an SQL union query:

SELECT * FROM TABLE WHERE [Name1]='Fred'
UNION SELECT * FROM TABLE WHERE [Name2]='Fred'
UNION SELECT * FROM TABLE WHERE [Name3]='Fred'
...

Then create a totals query (or report) based on the union query to provide a
summary and totals.

aa*******@gmail.com wrote:
>Hi

Need your expert help on the following

i have a table with the following records
EMP ID
Req No
Candidate name 1
candidate status 1
candidate name 2
candidate status 2
and so on for 5 candidates

the statusof each candidate is either owned,reviewed or rejected
i have managed to write a query which gives me the emp id wise record
for each candidate status

i,e, EMPID,candidate 1 status,count of candidate name

i am able to get the query to display the "candidate1status" as
"1001",Owned,4
"1001",Rejected,3
"1001"Reviewed,5

My question is how do i combine the status of multiple candidates to
show the total of the candidate's status i.e, sum of owned,rejected and
reviewed from the candidate status of all 5 candidates
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.