开发者

job results to a txt file in sql server

I have set up a job within SSMS to run everyday where it executes queries against two tables and stores the results in .csv text files in a folder. It works fine but I would like the files to be comma delimited text files and it is storing it with spaces between the columns and this creates unnecessary increase in size.. I went to tool/options etc and set the sql query text file format to comma delimited and it works fine when I run a manual query and select to save the results but not within the actual job. Any suggestions

In fact if I could get the results from bot queries to store into on开发者_运维问答e text file only that would be even better.


I think you may want to use

  1. SSIS and send the output to a file in CSV format
  2. BCP
  3. SQLCMD
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜