Transfering sql data into csv file

  • Is there any way that i can write the sql statment and transfer the results set into csv file.

     

     

    Thanks

  • You can specify it as part of the opions from the query analyser window (management studio).

    Instead of "results to text" or "results to grid", you can use "results to file"

    Though you may have to settle for tab delimited in SQL 2005 unless you can find the options for the output.

    I know you can do it in SQL 2000 and specify the output format


    Regards,

    Steve

    Life without beer is no life at all

    All beer is good, some beers are just better than others

  • you can use the bcp tool or the ssis import export wizard.


    Everything you can imagine is real.

  • There are also the ISQL and OSQL tools that will run your query from the command line.  They will generate a CSV file as output by default.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply