K
Kate
Here is my SQL view of a query I am running.
SELECT [Total Findings Query].[Date By Month], ([Sum Of SumOfTrue (+)]+[Sum
Of SumOfTrue (-)])/([Sum Of SumOfTrue (+)]+[Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]+[Sum Of SumOfFalse (-)])*100 AS [Accuracy %], [Sum Of
SumOfTrue (+)]/([Sum Of SumOfTrue (+)]+[Sum Of SumOfFalse (-)])*100 AS
[Sensitivity %], 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100) AS [Specificity %], Year([Total Findings Query].[Date
By Month])*12+DatePart('m',[Total Findings Query].[Date By Month])-1 AS Expr1
FROM [Total Findings Query], MPI INNER JOIN [TRUE/FALSE Findings] ON
MPI.Date = [TRUE/FALSE Findings].Date
GROUP BY [Total Findings Query].[Date By Month], ([Sum Of SumOfTrue
(+)]+[Sum Of SumOfTrue (-)])/([Sum Of SumOfTrue (+)]+[Sum Of SumOfTrue
(-)]+[Sum Of SumOfFalse (+)]+[Sum Of SumOfFalse (-)])*100, [Sum Of SumOfTrue
(+)]/([Sum Of SumOfTrue (+)]+[Sum Of SumOfFalse (-)])*100, 100-(([Sum Of
SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of SumOfFalse (+)]))*100),
Year([Total Findings Query].[Date By Month])*12+DatePart('m',[Total Findings
Query].[Date By Month])-1
ORDER BY Year([Total Findings Query].[Date By Month])*12+DatePart('m',[Total
Findings Query].[Date By Month])-1;
RESULTS SHOW AS:
Date By Month Accuracy % Sensitivity % Specificity % Expr1
January 2003 81.08 96.77 100.00 24036
I would like to add to this query a new field called # OF PATIENT'S CATH'D.
I have a query that I use for a monthly total:
SELECT [Total Findings for January].[SumOfTrue (+)], [Total Findings for
January].[SumOfTrue (-)], [Total Findings for January].[SumOfFalse (+)],
[Total Findings for January].[SumOfFalse (-)], [Total Findings for
January].[SumOf# of Patient's seen], ([SumOfTrue (+)]+[SumOfTrue
(-)]+[SumOfFalse (+)]+[SumOfFalse (-)])/[SumOf# of Patient's seen] AS [Total
Cath'd]
FROM [Total Findings for January];
RESULTS SHOW:
SumOfTrue (+) SumOfTrue (-) SumOfFalse (+) SumOfFalse (-) SumOf# of
Patient's seen Total Cath'd
30 0 6 1 165 0.22
But I would like to add the field Total Cath'd to the first query so that
it will list the result by month:
So it will show as
Date By Month Accuracy % Sensitivity % Specificity % Total Cath'd
January 2003 81.08 96.77 100.00 22%
SELECT [Total Findings Query].[Date By Month], ([Sum Of SumOfTrue (+)]+[Sum
Of SumOfTrue (-)])/([Sum Of SumOfTrue (+)]+[Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]+[Sum Of SumOfFalse (-)])*100 AS [Accuracy %], [Sum Of
SumOfTrue (+)]/([Sum Of SumOfTrue (+)]+[Sum Of SumOfFalse (-)])*100 AS
[Sensitivity %], 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100) AS [Specificity %], Year([Total Findings Query].[Date
By Month])*12+DatePart('m',[Total Findings Query].[Date By Month])-1 AS Expr1
FROM [Total Findings Query], MPI INNER JOIN [TRUE/FALSE Findings] ON
MPI.Date = [TRUE/FALSE Findings].Date
GROUP BY [Total Findings Query].[Date By Month], ([Sum Of SumOfTrue
(+)]+[Sum Of SumOfTrue (-)])/([Sum Of SumOfTrue (+)]+[Sum Of SumOfTrue
(-)]+[Sum Of SumOfFalse (+)]+[Sum Of SumOfFalse (-)])*100, [Sum Of SumOfTrue
(+)]/([Sum Of SumOfTrue (+)]+[Sum Of SumOfFalse (-)])*100, 100-(([Sum Of
SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of SumOfFalse (+)]))*100),
Year([Total Findings Query].[Date By Month])*12+DatePart('m',[Total Findings
Query].[Date By Month])-1
ORDER BY Year([Total Findings Query].[Date By Month])*12+DatePart('m',[Total
Findings Query].[Date By Month])-1;
RESULTS SHOW AS:
Date By Month Accuracy % Sensitivity % Specificity % Expr1
January 2003 81.08 96.77 100.00 24036
I would like to add to this query a new field called # OF PATIENT'S CATH'D.
I have a query that I use for a monthly total:
SELECT [Total Findings for January].[SumOfTrue (+)], [Total Findings for
January].[SumOfTrue (-)], [Total Findings for January].[SumOfFalse (+)],
[Total Findings for January].[SumOfFalse (-)], [Total Findings for
January].[SumOf# of Patient's seen], ([SumOfTrue (+)]+[SumOfTrue
(-)]+[SumOfFalse (+)]+[SumOfFalse (-)])/[SumOf# of Patient's seen] AS [Total
Cath'd]
FROM [Total Findings for January];
RESULTS SHOW:
SumOfTrue (+) SumOfTrue (-) SumOfFalse (+) SumOfFalse (-) SumOf# of
Patient's seen Total Cath'd
30 0 6 1 165 0.22
But I would like to add the field Total Cath'd to the first query so that
it will list the result by month:
So it will show as
Date By Month Accuracy % Sensitivity % Specificity % Total Cath'd
January 2003 81.08 96.77 100.00 22%