473,796 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "candidate1stat us" as
"1001",Owne d,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 2568
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 "candidate1stat us" as
"1001",Owned ,4
"1001",Rejecte d,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.c om
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
2345
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 returnd both. Oddly the second query returns only the desired single record but wihtout all the additional fields I need. Does the Inner join somehow mess with the query? Thanks
17
1857
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 single customer, the customer's orders, the order lines for those orders, the customer's invoices, and the invoice lines for those invoices. I'm thinking the term might be graph, but I'm not at all certain of this.
1
2319
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) not on the full dataset, but on a subset of the data in the people table. I want to avoid having to put criteria in all of the individual queries or forms, or having to change the data source for all the queries. Is there anyway I can restrict...
3
3859
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 or multiple sources. For those in multiple sources, the data for a person may not be complete in any source. For example, a person is in three sources; source#2 has the SSN and source#3 has the membership#. For those people who are in multiple...
2
2324
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 0 Now I need to generate the following monthly records using the above table:
2
3382
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 are neighbors of the organization, some are politicians, etc. Rather than create separate tables for each type of contact, I thought it would be better to have: one table with names/addresses one table with kinds of lists (vendors, board...
10
6733
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 contains only tables. I have linked the tables for the front end to the back end database. I am trying to set the recordsource of a form to a query established by the user to narrow the scope but I don't want to display the form if there are no...
11
3685
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) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
6
1653
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 leaders (fLdr1, fLdr2,…), and 7 assistant leaders (fALdr1, ALdr2,…). The fLdr and fALdr fields contain the tAllRecs.fMbrNo for each of the 14 total leaders and assistants. For each event (record) in tWalks, I have to print data that exists in...
2
2067
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). I have no problems exporting records with an addition query for a single table into a singel table of the other database. However, i would like to create a function to export the records in one go from the multiple tables in the first database to...
0
10457
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9054
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.