I have the following connection string in Connection Manager - Connection - Properties - Expressions - Connection String:
LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE()))) == 4 ?
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV" :
LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE()))) == 2 ?
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + "0" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + "0" + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV" :
LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE()))) == 3 && LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE()))) == 1 ?
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + "0" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV" :
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + "0" + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV"
The problem that I have is with DT_WSTR. It looks like a variable but I cannot find it in the ssis package. Needless to say, I have no documentation on this package and the person who developed this package is long gone from our organization. Can someone point me in the (somewhat) of the right direction to look for this (maybe) variable? Thanks for any help in advance. If you need more information I can provide it. Once again, thanks.
Dave
LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE()))) == 4 ?
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV" :
LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE()))) == 2 ?
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + "0" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + "0" + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV" :
LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE()))) == 3 && LEN((DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE()))) == 1 ?
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + "0" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV" :
"\\\\Fileserver\\Etl\\Accounting\\DataArchive\\CurrData\\ANODTN" + (DT_WSTR, 2) DATEPART("MM", DATEADD("dd", -1,GETDATE())) + "0" + (DT_WSTR, 2) DATEPART("dd", DATEADD("dd", -1,GETDATE())) + ".CSV"
The problem that I have is with DT_WSTR. It looks like a variable but I cannot find it in the ssis package. Needless to say, I have no documentation on this package and the person who developed this package is long gone from our organization. Can someone point me in the (somewhat) of the right direction to look for this (maybe) variable? Thanks for any help in advance. If you need more information I can provide it. Once again, thanks.
Dave