Jun 22, 2005 #1 hne Programmer Oct 16, 2003 38 US Hello, I would like to know how can I program my MsSQL to send my output to a .CSV file? Thanks.
Jun 22, 2005 #2 nomadicalloy Programmer Jun 18, 2005 144 US you can use stored proc with bcp command/format file to create csv file code Exec master..xp_cmdshell ''bcp "SELECT * FROM ##WrkData_LBW_Exp_2" queryout ' + CSV_FILE_Location + ' -f loanbase_format_2.fmt Thanks http://www.xpherion.com/blog.asp Upvote 0 Downvote
you can use stored proc with bcp command/format file to create csv file code Exec master..xp_cmdshell ''bcp "SELECT * FROM ##WrkData_LBW_Exp_2" queryout ' + CSV_FILE_Location + ' -f loanbase_format_2.fmt Thanks http://www.xpherion.com/blog.asp
Jun 23, 2005 #3 mrdenny Programmer May 27, 2002 11,595 You can use BCP, BulkInsert, or DTS to export data from MS SQL to a CSV file. Denny MCSA (2003) / MCDBA (SQL 2000) --Anything is possible. All it takes is a little research. (Me) http://www.mrdenny.com (Not quite so old any more.) Upvote 0 Downvote
You can use BCP, BulkInsert, or DTS to export data from MS SQL to a CSV file. Denny MCSA (2003) / MCDBA (SQL 2000) --Anything is possible. All it takes is a little research. (Me) http://www.mrdenny.com (Not quite so old any more.)