mraetrudeaujr
Technical User
I have been trying to work this out on my own, to no avail. What I need are TOTALS. It should be pretty straightforward, but the totals aren't coming out right. It looks like it is counting all of the record entries for a particular station, and then using that for the totals on each of the three categories. If I can get this query to work, I think that I can use it's design on another database that uses similar data. Here is the SQL and the results;
As you can see from the resultant 'table' these figures aren't/cannot be right. Please help! Thanks in advance.
Also, how can I get my query results to post just like when you run it and it comes back like 'Excel'?
Code:
SELECT [tbl_reinstatement].[STATION], Count([tbl_reinstatement].[WA_NTA]) AS [WA/NTA], Count([tbl_reinstatement].[VOLUNTARY_RETURN]) AS [VOLUNTARY RETURNS], Count([tbl_reinstatement].[TURNED_OVER_TO]) AS [TURNED OVER TO OTHER AGENCY]
FROM tbl_reinstatement
GROUP BY [tbl_reinstatement].[STATION]
HAVING (((tbl_reinstatement.STATION) Is Not Null) AND ((Count(tbl_reinstatement.WA_NTA)) Is Not Null) AND ((Count(tbl_reinstatement.VOLUNTARY_RETURN)) Is Not Null) AND ((Count(tbl_reinstatement.TURNED_OVER_TO)) Is Not Null))
Code:
STATION WA/NTA VOLUNTARY RETURNS TURNED OVER TO OTHER AGENCY
BLV 85 85 85
BRF 68 68 68
CAO 70 70 70
CHU 56 56 56
ECJ 80 80 80
I8 CHKPT 1 1 1
I94 CHKPT 65 65 65
IMB 94 94 94
SCM 63 63 63
TEM 66 66 66
As you can see from the resultant 'table' these figures aren't/cannot be right. Please help! Thanks in advance.
Also, how can I get my query results to post just like when you run it and it comes back like 'Excel'?