Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 select count *

Author  Topic 

Sigenstroem
Starting Member

5 Posts

Posted - 2012-04-11 : 10:32:03
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
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-04-11 : 10:34:03
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

5 Posts

Posted - 2012-04-12 : 11:35:13
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
   

- Advertisement -