Hi All,
I have an SSIS package that i'm trying to write that is pretty basic: reads from a csv, I want to filter the incoming rows to only insert rows from yesterday, then load into db.
I have a Flat File Source --> Conditional Split --> OLE DB destination
In the Conditional Split however, I am having problems trying to create the condition that will only insert rows where [date] column is of yesterday.
The [date] column however, is a varchar column in the format yyyy-mm-dd so I figure I have to convert/cast it to a date or datetime.
I tried using this but I cant get it non-red!
DATEPART( "DAY", CAST([Date] as datetime) ) == DATEPART( "DAY", getdate() -1)
The error is:
Attempt to parse the expression ,,, failed. The expression might contain an incomplete token, invalid token or an invalid element.
if I take that and put it in a select, it works fine, but within the Conditional Split I don't quite know the proper syntax
Thanks in advance


