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.
    
        
            
                
                    
                        
                            
                                | Author | 
                                
                                 Topic  | 
                             
                            
                                    | 
                                         Sigenstroem 
                                        Starting Member 
                                         
                                        
                                        5 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-04-11 : 10:32:03
                                            
  | 
                                             
                                            
                                            HiI'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 31Are there a faster and better way them creating 93 separate statements like this oneSELECT 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.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     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  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |