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 |  
                                    | Syamsul IzwaniStarting Member
 
 
                                        1 Post | 
                                            
                                            |  Posted - 2012-09-22 : 05:07:28 
 |  
                                            | Hi,How to export data from table into csv file just using query?I want to download the data using CSV file did anyone know how to do this????SYAMSUL |  |  
                                    | sunitabeckMaster Smack Fu Yak Hacker
 
 
                                    5155 Posts | 
                                        
                                          |  Posted - 2012-09-22 : 08:49:16 
 |  
                                          | You can use bcp - there are examples on this MSDN page: http://msdn.microsoft.com/en-us/library/ms162802.aspxBCP is a command that you run from a command line on the OS. To run it as a query, you will need to use xp_cmdshell: http://msdn.microsoft.com/en-us/library/ms175046.aspx |  
                                          |  |  |  
                                    | visakh16Very Important crosS Applying yaK Herder
 
 
                                    52326 Posts |  |  
                                |  |  |  |