verstapp
Programmer
- Jul 20, 2008
- 6
I have a query which takes a user-supplied parameter and produces an output like this
Date Count parameter x
=== ============
I currently run the query 3 times with the 3 possible parameters and then copy-and-paste the results to produce an output like that below.
I would like to query all 3 parameters simultaneously, producing
Date Count parameter1 Count parameter2 Count parameter3
=== =========== =========== ==========
Is it possible to do this in one query?
Date Count parameter x
=== ============
Code:
SELECT [asset tests].[test date], count(assets.[asset key])
FROM [asset tests] LEFT JOIN assets ON ([asset tests].[asset id] = assets.[asset key]) and (assets.[test period] =[Enter test period] or assets.[visual period] =[Enter test period])
GROUP BY [test date];
I currently run the query 3 times with the 3 possible parameters and then copy-and-paste the results to produce an output like that below.
I would like to query all 3 parameters simultaneously, producing
Date Count parameter1 Count parameter2 Count parameter3
=== =========== =========== ==========
Is it possible to do this in one query?