December 4, 2011 at 7:28 am
Hi, I am hoping someone on this forum will be able to help me! I can't get the syntax right with the Conditional Operator within the Derived Column dataflow task.
I have tried it three different ways and basically want the value "FY12" for every row of FiscalYearNumber column:
[FiscalYearNumber] ==NULL ? FY12 : [FiscalYearNumber]
[FiscalYearNumber] ==0 ? FY12 : [FiscalYearNumber]
[FiscalYearNumber] ==" " ? FY12 : [FiscalYearNumber]
Background:
I am trying to import data from a single Excel file to a SQL table. The column 'FiscalYearNumber' did not exist, neither in the source file nor the destination table, so I've added it manually to both. (I would prefer to create the column within SSIS, but am ok creating it manually at this point).
Most importantly, for each row of data in the source file, this new FiscalYearNumber column should contain the value "FY12".
Will someone please help me with the conditional statement?
December 4, 2011 at 10:09 am
I found the syntax that worked: ISNULL(FiscalYearNumber) ? "FY12" : FiscalYearNumber
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply