需要一个大约每5分钟输出一个表格的CSV文本文件的任务。
服务器是MSSQL 2008.它是一个生产服务器。
要求是:
* utf8输出
*'\ t'或';' 细胞分离器
*'\ n'行结束符
*文件应该被覆盖*输出是两个表的连接(dbo.article和dbo.stock键为'c_art')
问题中的信息太less,我不能完全确定您的要求,但是您可以在计划任务中使用BCP或作为存储过程来完成此任务。
命令格式:
BCP <table> out <filename> <switches> The switches used here are: * -c Output in ASCII with the default field terminator (tab) and row terminator (crlf) * -t override the field terminator with "," * -T use a trusted connection. Note that U –P may be used for username/password * -S connect to this server to execute the command