How to produce an csv output file from stored procedure in SQL Server

后端 未结 7 889
孤独总比滥情好
孤独总比滥情好 2020-12-03 14:01

Is it possible to generate a csv file from a stored procedure in SQL Server? I created my stored procedure and I want to stored some result as csv, does someone know how to

7条回答
  •  我在风中等你
    2020-12-03 14:41

    Found a really helpful link for that. Using SQLCMD for this is really easier than solving this with a stored procedure

    http://www.excel-sql-server.com/sql-server-export-to-excel-using-bcp-sqlcmd-csv.htm

提交回复
热议问题