Code: Select all
sv_weeks = If fromX.fire_date = char(128) then 27 else DateYearFirstDiff(fromX.fire_date, fromX.hire_date)/7
Code: Select all
if sv_weeks < 27 then weeks else 0
1. The transformer is followed by an AGG (where derivation is Last(emp_duration) and type interger 3)...which when run warns -
myJob..AggSal: At row 4429, link "outTrans1", while processing column "outAgg1.emp_duration"
Value treated as NULL
Attempt to convert String value "" to Long type unsuccessful
2. If I use the Rnd function in the DateYearDifference function to round to the next week, then sv_weeks (which are NULL) are evaluated to being > 27 and temp_duratoin takes the else path. But I want it to be set to 27 if it is Null.
Please tell me where I have gone wrong.