How can i get query result into a file

  • Hi,

    How i can ge a query result into a text file by using field delimiter "," .

    by using query .

    Can i do it or it is not possible .

    Please let me know.

    Arun

  • I usually use SSIS for that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • SSIS does do a great job. You can also run the script manually and output the results to a file through Management Studio. You can also use sqlcmd.exe to run a query from a command line and output to several formats including delimited.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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