Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mystery variable in connection string

Status
Not open for further replies.

hedgracer

Programmer
Mar 21, 2001
186
US
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
 
DT_WSTR is a SSIS Datatype SSIS doesn't use int and varchar. DT_WSTR is a unicode string the DT_WSTR.

It appears to be creating file names based on the current process date.
 
As MDXer says - DT_WSTR is the Unicode datatype in SSIS.

The function you posted contains lots of (DT_WSTR,2), which is the type cast to convert data to Unicode string, length 2

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top