Hello, is it possible to use a variable in a import template to dynamically select a file that changes names every week?
Variable set via the following select statement:
SELECT 'c:'
+ CONVERT(VARCHAR(4),YEAR(DATEADD(wk, 0, DATEADD(DAY, 0-DATEPART(WEEKDAY, GETDATE()), DATEDIFF(dd, 0, GETDATE())))))
+ '-' + right('00'+CONVERT(VARCHAR(2),(MONTH(DATEADD(wk, 0, DATEADD(DAY, 0-DATEPART(WEEKDAY, GETDATE()), DATEDIFF(dd, 0, GETDATE())))))),2)
+ '-' + right('00'+CONVERT(VARCHAR(2),(DAY(DATEADD(wk, 0, DATEADD(DAY, 0-DATEPART(WEEKDAY, GETDATE()), DATEDIFF(dd, 0, GETDATE())))))),2)
+ ' Data.xlsx';