简体   繁体   中英

SSIS : Using a variable as the name of a flat file destination

I have an SSIS solution where depending on a parameter, it launches the extraction of different databases, each in a different file, and the name must contain the date of the extraction so we can't hard code the name in the Destination wizard, I must use a variable where I concatenate the date to a file name, and I have to use that variable as the file name. But the destination wizard only seems to let me write plain text.

在此处输入图片说明

Any idea how I can do this ?

Select the connection manager in the Connection managers bar. Go to the Properties Pane and find the "expressions" option. Click the ellipsis in the adjacent blank window to open a new window.

Find "File Name" or "Connection String" in the drop down, and then in the expression, put the name of your variable.

If the file may not exist before the package is run, ensure you enable delay validation on the connection manager too.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM