SSIS-数据库中的查询值以提供Excel导出文件名

发布于 2025-01-21 01:03:26 字数 308 浏览 3 评论 0原文

我正在使用 SQL Server Data Tools 构建数据导出 SSIS 包,我想将其部署到多个不同的 SQL Server 上。

为了在所有 SQL Server 上保持包标准,我需要以某种方式使用包中的变量来标识 Excel 文件名和路径,其格式类似于以下示例:

D:\Export\Files\CUSTOMERNAME\Monthly_Export。 xlsx

对于每个部署,文件夹结构和文件名都相同,只有客户名称会更改。

我可以通过 SQL 查询轻松检索客户名称,但我不知道是否/如何将其用作变量。

有人可以帮忙吗?

I am building a data export SSIS package using SQL Server Data Tools, I would like to deploy this across several different SQL Servers.

To keep the package standard across all SQL Servers, I need to somehow use a variable in the package to identify the Excel filename and path, which is in a format similar to the example below:

D:\Export\Files\CUSTOMERNAME\Monthly_Export.xlsx

For each deployment the folder structure and filename would be the same, only the customer name would change.

I can easily retrieve the customer name via SQL query, but I don't know if/how I can use this as a variable.

Can anyone assist please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文