W
Wolf94800
I have this:
SELECT [Employee Identification].[Last Name],
(Sum([Alpha].[IV_Success]))/Sum([Alpha].[IV_Attempt]) AS [IV Avg],
IIf([Alpha.[IO_Attempt]=0,Null,(Sum([Alpha].[IO_Success]))/(Sum([Alpha].[IO_Attempt])))
AS [IO Avg], (Sum([Alpha].[ETT_Success]))/(Sum([Alpha].[ETT_Attempt])) AS
[ETT Avg]
FROM [Employee Identification] INNER JOIN Alpha ON [Employee
Identification].Medic_Number = Alpha.Medic_Number
GROUP BY [Employee Identification].[Last Name], [Employee
Identification].Title, Alpha.Medic_Number
HAVING ((([Employee Identification].Title)<>"Basic"))
ORDER BY [Employee Identification].[Last Name];
I want to be able to have the averages with no entries be displayed as zero,
but can't figure out where to fit the IIf statement in.
Thanks For Any Help.
SELECT [Employee Identification].[Last Name],
(Sum([Alpha].[IV_Success]))/Sum([Alpha].[IV_Attempt]) AS [IV Avg],
IIf([Alpha.[IO_Attempt]=0,Null,(Sum([Alpha].[IO_Success]))/(Sum([Alpha].[IO_Attempt])))
AS [IO Avg], (Sum([Alpha].[ETT_Success]))/(Sum([Alpha].[ETT_Attempt])) AS
[ETT Avg]
FROM [Employee Identification] INNER JOIN Alpha ON [Employee
Identification].Medic_Number = Alpha.Medic_Number
GROUP BY [Employee Identification].[Last Name], [Employee
Identification].Title, Alpha.Medic_Number
HAVING ((([Employee Identification].Title)<>"Basic"))
ORDER BY [Employee Identification].[Last Name];
I want to be able to have the averages with no entries be displayed as zero,
but can't figure out where to fit the IIf statement in.
Thanks For Any Help.