Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Posts
    58

    Unanswered: tsql Output to .csv

    What is the best way to output a query to a .csv file for a Microsoft SQL Server Analyzer using tsql?

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    bcp.exe is the easiest way IMO.

    it's normally invoked from the cmd line, but you can invoke it from sql if you use xp_cmdshell.

  3. #3
    Join Date
    Oct 2005
    Posts
    58
    Ah, yes. I remember that one. I'll try it out. Thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •