SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 select count *
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sigenstroem
Starting Member

Denmark
5 Posts

Posted - 04/11/2012 :  10:32:03  Show Profile  Reply with Quote
Hi

I'm not sure it can be done, but this should be the right place to ask about it.

I've got a table with 93 checkbox, and I need to count those that are true individual.
It has Day1 to Day31, Evening1 to Evening31 and of course Night 1 to 31

Are there a faster and better way them creating 93 separate statements like this one
SELECT COUNT(Day1)as Dag1 from Table where Dag1 = 'true'

-----------------------------------------
http://w3blog.dk / http://webiq.dk

webfred
Flowing Fount of Yak Knowledge

Germany
8766 Posts

Posted - 04/11/2012 :  10:34:03  Show Profile  Visit webfred's Homepage  Reply with Quote
the solution would be to change the design. google for normalization.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Sigenstroem
Starting Member

Denmark
5 Posts

Posted - 04/12/2012 :  11:35:13  Show Profile  Reply with Quote
quote:
Originally posted by webfred

the solution would be to change the design. google for normalization.


No, you're never too old to Yak'n'Roll if you're too young to die.



Would you elaborate on that a bit.?

The page I,m working on is a roster where you can work day, evening or night when crossed by a given point in time you will be working.
So if there is another way to make, let me know.

-----------------------------------------
http://w3blog.dk / http://webiq.dk
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000