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  | 
                             
                            
                                    | 
                                         manojbiswas 
                                        Starting Member 
                                         
                                        
                                        4 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2008-08-26 : 06:44:28
                                            
  | 
                                             
                                            
                                            | I have a query which gives results likeACTIVITY   MONTH1  MONTH2   MONTH3   MONTH4  MONTH5   MONTH6 ...PLAN        1.5      2.1      3.1      1.0     1.2      4.6ACTUAL       1.2     2.O       2.9      0.7     1.0      2.7I WANT TO CHANGE THE ORIENTATION OF THE TABLE IN THE FOR AS GIVEN BELOW,MONTH       PLAN         ACTUALMONTH1      1.5           1.2MONTH2      2.1           2.0MONTH3      3.1           2.9MONTH4       1.0          0.7....KINDLY HELP ME TO GET IT DONE AS I AM STUCK.REGARDS,MANOJ BISWAS | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     SwePeso 
                                    Patron Saint of Lost Yaks 
                                     
                                    
                                    30421 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-08-26 : 07:17:23
                                          
  | 
                                         
                                        
                                          Edit the original query and remove the TRANSFORM part. E 12°55'05.25"N 56°04'39.16"  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     manojbiswas 
                                    Starting Member 
                                     
                                    
                                    4 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-08-27 : 00:26:07
                                          
  | 
                                         
                                        
                                          | Actually it is a union query which is a rusult of 2-3 queries. This union query gives results like ACTIVITY   MONTH1  MONTH2   MONTH3   MONTH4  MONTH5   MONTH6 ... upto MONTH36PLAN         1.5          2.1           3.1          1.0         1.2          4.6ACTUAL        1.2          2.O           2.9          0.7        1.0           2.7ACTIVITY, MONTH1, MONTH2 ETC is column of the query headings. and 1st row values are PLAN, 1.5, 2.1 etc and 2nd row values are ACTUAL, 1.2 2.0 etc.I want to prepare a chart for monthwise progress for PLAN and ACTUAL values. For preparing the chart I need to realign the data in following manner. Ans so i need to write a query.MONTH            PLAN         ACTUALMONTH1           1.5             1.2MONTH2           2.1             2.0MONTH3           3.1             2.9MONTH4           1.0             0.7etc.Please help me to write a query for realigning the data as above.Manoj Biswass  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |