Print Page | Close Window

MS SQL Select and Count question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20624
Printed Date: 29 March 2026 at 4:25am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: MS SQL Select and Count question
Posted By: ctscott
Subject: MS SQL Select and Count question
Date Posted: 10 July 2006 at 9:41pm
i'm not sure this is doable....ought to be.
 
i have a rows in a table with a Employee field (text),  Department (text) field  and a  Employee_Sig_Received (Bit) Field, among others, in it.  Department will be in each row and can be duplicated.
 
I want to put out a web page with Department (distinct) and how many 1's and how many 0's for the department.
 
Dept.    True    False
A             6         2
B             9         0
C             4         4
 
i've tried multiple combos of selects, goups, sums et all.  any ideas as to what would be needed.


-------------
______________________
http://www.cfbtrivia.com" rel="nofollow - College Football Trivia



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net