saraann422
Technical User
I'm starting with this SQL query in Access and will add on if I get what I need out of this.
This Union All query looks like this when it's run:
Name Totals
QC'er #
TimeAway #
I want to be able to use these totals in calculations in a report and to format them there. So, is there a way to make the query look more like this?
QC'er TimeAway
# #
THANK YOU!!
Sarah
SELECT 'QCd' as [Name], Count([QC Information].[QC'er]) AS [Totals]
FROM [QC Information]
HAVING ((([QC Information].[QC'er])=[First Last]) AND (([QC
Information].[Today's Date])>=[StartDate] And ([QC Information].[Today's
Date])<=[EndDate]) AND (([QC Information].[Case
Status])="Expedite/Re-QC" Or ([QC Information].[Case Status])="Expedite"
Or ([QC Information].[Case Status])="Re-QC" Or ([QC Information].[Case
Status])="New"))
UNION ALL SELECT 'TimeAway' as [Name],
Sum(IIf([Employee]=[Employee],((([Attendence/CYA]!Hours*60)+[Attendence/
CYA]!Minutes)/60),0)) AS Totals
FROM [Attendence/CYA]
HAVING ((([Attendence/CYA].Employee)=[First Last]) AND
(([Attendence/CYA].[Date of Absence])>=[StartDate] And
([Attendence/CYA].[Date of Absence])<=[EndDate]));
This Union All query looks like this when it's run:
Name Totals
QC'er #
TimeAway #
I want to be able to use these totals in calculations in a report and to format them there. So, is there a way to make the query look more like this?
QC'er TimeAway
# #
THANK YOU!!
Sarah
SELECT 'QCd' as [Name], Count([QC Information].[QC'er]) AS [Totals]
FROM [QC Information]
HAVING ((([QC Information].[QC'er])=[First Last]) AND (([QC
Information].[Today's Date])>=[StartDate] And ([QC Information].[Today's
Date])<=[EndDate]) AND (([QC Information].[Case
Status])="Expedite/Re-QC" Or ([QC Information].[Case Status])="Expedite"
Or ([QC Information].[Case Status])="Re-QC" Or ([QC Information].[Case
Status])="New"))
UNION ALL SELECT 'TimeAway' as [Name],
Sum(IIf([Employee]=[Employee],((([Attendence/CYA]!Hours*60)+[Attendence/
CYA]!Minutes)/60),0)) AS Totals
FROM [Attendence/CYA]
HAVING ((([Attendence/CYA].Employee)=[First Last]) AND
(([Attendence/CYA].[Date of Absence])>=[StartDate] And
([Attendence/CYA].[Date of Absence])<=[EndDate]));