I want to generate monthly reports containing a count of the number of different types of invoices processed during the month.
I want the count of invoices of type "A" to end up in a field called "A", the count of type "B" in a field called "B", etc.
I tried using a union query, but the counts ended up as several different records instead of one record with several fields.
Here's what I tried (that didn't work):
SELECT Count(*) AS 48
FROM Invoice
WHERE ((type_id = "48 Agreement") and (Auditor = "Cheryl"))
UNION ALL SELECT Count(*) AS ES
FROM Invoice
WHERE ((type_id = "Travel") and (Auditor = "Cheryl"));
I want the count of invoices of type "A" to end up in a field called "A", the count of type "B" in a field called "B", etc.
I tried using a union query, but the counts ended up as several different records instead of one record with several fields.
Here's what I tried (that didn't work):
SELECT Count(*) AS 48
FROM Invoice
WHERE ((type_id = "48 Agreement") and (Auditor = "Cheryl"))
UNION ALL SELECT Count(*) AS ES
FROM Invoice
WHERE ((type_id = "Travel") and (Auditor = "Cheryl"));