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  | 
                             
                            
                                    | 
                                         nelsont 
                                        Starting Member 
                                         
                                        
                                        25 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-08-06 : 18:00:00
                                            
  | 
                                             
                                            
                                            | Hi, I have a bunch of data flow steps in an SSIS package. My source is a sql statement and my destination is a csv file.In the destination, the fields are not in the same order as my source table.At first, I had 'select * from mytable' as the sql statement, but when I first noticed the problem I changed all of my source sql statements to explicitly list the columns I wanted.  Still, the output columns are not in same order as my select statement.Is there any way to force it to output in the same format as my sql statement?  I have 77 data flow object that I will have to change, and almost all of the output formats are different.Thanks in advance. | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-08-06 : 18:28:51
                                          
  | 
                                         
                                        
                                          | did you check and metadata in ssis and see order of columns? is it same as source or different?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     nelsont 
                                    Starting Member 
                                     
                                    
                                    25 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-08-06 : 18:51:45
                                          
  | 
                                         
                                        
                                          | My source is sql statement pulling from a table in my database.  The order of the columns in that table is the same order as my select statement.  But when I look at the mapping of the columns in the flat file destination, the order is different.It's not different in any organized way that I can see, either.  It's not an alphabetical list or grouped by data type or anything.  It seems random.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-08-06 : 18:58:14
                                          
  | 
                                         
                                        
                                          quote: Originally posted by nelsont My source is sql statement pulling from a table in my database.  The order of the columns in that table is the same order as my select statement.  But when I look at the mapping of the columns in the flat file destination, the order is different.It's not different in any organized way that I can see, either.  It's not an alphabetical list or grouped by data type or anything.  It seems random.
  it will get jumpled up only if you did some modifications since the data flow was created. the time when it gets created it will excatly follow order in source------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |