如何在不使用 sql server 代理作业(也没有 BI)的情况下按计划运行 sql 查询并将结果输出到 excel 文件中

2021-09-10 00:00:00 tsql sql-server

我想按特定计划(每周)运行 sql 查询,并且还需要在 excel 文件中捕获输出.

I want to run a sql query on a specific schedule (weekly) and need to capture the output in an excel file as well.

由于业务限制,我们无法使用 SQL 服务器作业,也无法安装商业智能工具.

Due to business restrictions we cannot use SQL server jobs and we cannot install Business Intelligence tools too.

问候,RP

推荐答案

设置 Windows 计划任务以运行 osql 实用程序,它可以触发您的 SQL

set a Windows schedule task to run the osql Utility, which can fire off your SQL

相关文章