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 |  
                                    | sreekanth939Starting Member
 
 
                                        12 Posts | 
                                            
                                            |  Posted - 2009-04-24 : 02:40:03 
 |  
                                            | i have a table:ABCid    date        name  attendance1    1/1/2009     a      12    1/1/2009     b      03    2/1/2009     a      04    2/1/2009     b      1   here attendance 1 for present 0 for absent i need thedetails of attendance as following when one istaking report of ABC eg:data between 1/1/2009 and 2/1/2009name,1/1/2009 2/2/2009a     present  leaveb      leave    presenti done this throug following sql query using casebut my table is not small.and it take long time to get the result.beacause in my case when one take reprt of 1/1/2009 to 30/1/2009i must have to put condition in a loop with case.and my query take long long time top execute..Any other method to sole this time delay?plsssssssssssssss |  |  
                                    | SwePesoPatron Saint of Lost Yaks
 
 
                                    30421 Posts | 
                                        
                                          |  Posted - 2009-05-07 : 02:07:24 
 |  
                                          | You can use the PIVOT method to get your results. E 12°55'05.63"N 56°04'39.26"
 |  
                                          |  |  |  
                                |  |  |  |