Thursday, 19 September 2013

SSIS Derived Column

SSIS Derived Column

I want to use where clause in derived column ie
I have Table 1, Table 2 I have to compare these both and change the Name
column in table 1.
Two conditions are to be satisfied
1) If I have name as UNK or UNKNOWN or NULL and HI_UN as 1 then it needs
to be changed to UNKNOWN
2) If I have name as UNK or UNKOWN or NULL and P_M has A or R then it
needs to be changed to UNoccupy
Table 1
NUM VEH NAME P_M HI_UN
017 1 UNK A 1
037 2 DESORMEAUX, JR. MICHELLE B 2
043 3 UNK R 3
073 4 UNKNOWN A 4
Table 2
VEH HI_UN
1 1
2 2
3 3
4 4
END RESULT:
NUM VEH NAME P_M
HI_UN
017 1 UNKNOWN A 1
037 2 DESORMEAUX, JR. MICHELLE B 2
043 3 UNoccupy R 3
073 4 UNKNOWN A 4

No comments:

Post a Comment