Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Need help with expression builder

$
0
0

This is the expression I am using

@[User::DataLoadDir]+(DT_STR,4,1252)YEAR( DATEADD( "dd", -1, getdate() ))+
(DT_STR,4,1252)MONTH( DATEADD( "dd", -1, getdate() ))+
(DT_STR,4,1252)DAY( DATEADD( "dd", -1, getdate() ))+ @[User::FileName] +@[User::Extension]

which equates to this \\172.30.4.206\dalr_prod\CP\201893*_AUDIT_REPORT_EXTRACT.txt

I get the error msg

[Flat File Source [2]] Error: Cannot open the datafile "\\172.30.4.206\dalr_prod\CP\201893*_AUDIT_REPORT_EXTRACT.txt".

The actual file name is '20180903010957_AUDIT_REPORT_EXTRACT whereas the expression builder omits the '0' just before the 3 this file is generated each day with a timestamp. Would this be enough for the error to happen? Just noticed that it is the same as the month which is missing the 0 before the 9




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>