473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Sum records from multiple queries

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
1 2542
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fred | last post by:
I have a query that returns multiple identical records, however it should only return one. Indeed there is only one record for the OrderActionTypecode of 'P' yet there are two orderactions so it...
17
by: Steve Jorgensen | last post by:
Terminology question: Is there a term for a set of records related directly or indirectly by key value in several tables? For example, a single invoice record and its line item records -or- a...
1
by: Roger Green | last post by:
I have inherited a complex database that has many dozens of queries that derive data from a people table. I now need to be able to run these queries (from within a significant number of forms)...
3
by: Steve | last post by:
I have a people table of about 25 fields. The table is initially created each year from 5 different sources. The records from each source are appended to the people table. Any person may be in one...
2
by: karmaverma | last post by:
I need help with this apparently simple problem. I have a table with the following records: Effective_Date Commodity Price 10/1/2005 0 5/1/2006 2750 10/1/2006 ...
2
by: Allen Anderson | last post by:
Hi, I'm trying to design contact (names and addresses) tables in an Access database. Some of the contacts represent vendors, some are board members of the organization, some are donors, some...
10
by: Robert | last post by:
How do you get an accurate count of the number of records returned from a query when using linked tables. I have an access 2003 database as a front end to another access 2003 database that...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
6
by: Rob B. | last post by:
I have a membership table (tAllRecs), with each member assigned a unique number (fMbrNo). I have an event table (tWalks), with each event assigned a unique number (fWalkNo). Each event has 7...
2
by: jjwiet | last post by:
Hello, I use access 2003 and attempting to export/copy records between two access databases (almost identical) with multiple tables (both databases having the same relations between the tables)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.