Hi
I have 1 table to hold messages for various departments
ID Dept Message
1 Admin Message 1
2 Admin Message 2
3 Tech Message 3
4 Tech Message 4
5 Tech Message 5
6 Mgr Message 6
7 Mgr Message 7
I can get the following result :
Admin 2
Tech 3
Mgr 2
using the standard group and count to get the total number of messages per dept.
My question is how can I get a result like this
Admin 2
Tech 0
Mgr 0
if some of the records no longer exist or are flagged as a read message. The Dept types are fixed so part of the query can be - where Dept in ("Admin","Tech", "Mgr") so that other depts can be added if required.
Thanks in advance
I have 1 table to hold messages for various departments
ID Dept Message
1 Admin Message 1
2 Admin Message 2
3 Tech Message 3
4 Tech Message 4
5 Tech Message 5
6 Mgr Message 6
7 Mgr Message 7
I can get the following result :
Admin 2
Tech 3
Mgr 2
using the standard group and count to get the total number of messages per dept.
My question is how can I get a result like this
Admin 2
Tech 0
Mgr 0
if some of the records no longer exist or are flagged as a read message. The Dept types are fixed so part of the query can be - where Dept in ("Admin","Tech", "Mgr") so that other depts can be added if required.
Thanks in advance