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  | 
                             
                            
                                    | 
                                         asif372 
                                        Posting Yak  Master 
                                         
                                        
                                        100 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2013-05-21 : 09:08:10
                                            
  | 
                                             
                                            
                                            | I am Working On Attendance System my Data is like thisID Describing EmployeeID CheckTime Data describe the timings and Type Describing its type of IN or Out.ID--------CheckTime---------------Type11--------2013-01-01 09:00:00-----I11--------2013-01-01 09:10:00-----I11--------2013-01-01 09:11:00-----I11--------2013-01-01 12:00:00-----O11--------2013-01-01 12:02:00-----O11--------2013-01-01 14:15:00-----I11--------2013-01-01 14:45:00-----O11--------2013-01-01 15:00:00-----I11--------2013-01-01 15:03:00-----I11--------2013-01-01 18:00:00-----O11--------2013-01-01 18:00:00-----O11--------2013-01-02 09:10:00-----I11--------2013-01-02 09:11:00-----I11--------2013-01-02 18:00:00-----O11--------2013-01-02 18:05:00-----OBasically i want first in second out third in fourth out and so on Concept like thisID----DATE---------TimeIN-----TimeOut---11--2013-01-01----09:00:00---12:02:00---11--2013-01-01----14:15:00---14:45:00---11--2013-01-01----15:00:00---18:00:00---11--2013-01-02----09:10:00---18:05:00---can my requirement be fullfill while using Pivot Table if yes than what will be the query or any other query way with better speedThanks in Advance Regards | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     James K 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    3873 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2013-05-21 : 10:20:18
                                          
  | 
                                         
                                        
                                          | Doesn't the queries people posted in this thread give you what you are looking for? http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=184712  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |