Ahh, next bit. When I use this its fine, but if I add a HAVING or WHERE clause it seems to throw it back to how it was originally. Which does kind of make sense....
SELECT Codes.Code, Count(Main.S2_Q2) AS [Count]
FROM Main RIGHT JOIN Codes ON Main.S2_Q2 = Codes.Val
GROUP BY Main.HolRef...
Sorry for not replying yesterday.
PHV's response is pretty much as far as I got, which in theory should work, but it seems to give slightly eratic data.
For example I have set the field S2_Q1 to all being 1, for 20 rows. The table Code.Val has the codes I will ultimaltely be using which has...
Ok....
Heres the query...
Tables
Main (all data)
Codes (values - with 4 options 1 - 4)
SELECT Codes.Code, Count(Main.S2_Q1) AS Count FROM Main INNER JOIN Codes ON Main.S2_Q1 = Codes.Val GROUP BY Codes.Code, Codes.Val ORDER BY Codes.Val;
Tried a left join but probably did it wrong....
Help...
Hi,
I'm doing a simple report whereby I am querying a table sorting the data,etc, but I want it to display all the possible values, rather than a subset (as its ultimatley going to be output to a chart)
For example at the moment I am getting this back
val Count
1 5
3 6
But would...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.