I have a formula that I need to be able to put into my SSIS Derived Column... Below it is..
if MONTH(Sls.SlsDt) + DAY(Sls.SlsDt) > MONTH(TODAY) + DAY(TODAY) then
dYdtYr = 0.
else
dYdtYr = YEAR(Sls.SlsDt).
How would I put the above business logic into a SQL SSIS ETL Derived Column Transformation?
Is Derived Column the right option to accomplish this?
The ETL package is an import from CSV to SQL staging table, during this import I need to output a new column (or replace existing) that has the logic above implemented.
The input rows contain the MONTH and DAY and dYdtYr columns.. In a sense, I would need to override the dYdtYr value with new value based on the above logic.
MONTH
andDAY
functions both return integers. Did you really want to add those two numbers together, or is this really an attempt to compare two dates? – Edmund Schweppe