Can someone give me a little hand on this query

Hi

I have 2 tables

here's the tables

Users:
userid(int)
username(nvarchar)

calendar:
day(datetime)
userid (int)
exception (bit)

I want a list of users with the total exceptions, the problem is that if I do where exception = 1 the ones who don't have any event in the table calendar won't appear...

How can I do it...
[405 byte] By [Santal_Maluko] at [2007-11-19 11:11:02]
# 1 Re: Can someone give me a little hand on this query
Which DBMS are you using? What do you mean by "total exceptions"? What is the relationship between the two tables (I assume a user may have 0-n associated entries in the calendar table, but is this correct)?
panayotisk at 2007-11-9 13:41:58 >
# 2 Re: Can someone give me a little hand on this query
Maybe you just need a LEFT OUTER JOIN, but if you answer the above questions it will be clearer.
panayotisk at 2007-11-9 13:42:58 >
# 3 Re: Can someone give me a little hand on this query
I've already solved it... I used sub querys with outer joins on it...
Santal_Maluko at 2007-11-9 13:43:57 >