Hi
If ((IsNull(DSLink2.DUNS_LEVEL_1) =0) And (IsNull (DSLink2.DUNS_LEVEL_2) = 0) And (IsNull( DSLink2.DUNS_LEVEL_3) =1)) Then DSLink2.LEGACY_CD Else DSLink2.DUNS_LEVEL_3 .
In the above query it checks that if my first level is not null and my second level is not null and my third level is null, it populates the required field in the third level. Is the above query right?. for eg
level1 level2 level3
1234 2545 null
then output should be
level1 level2 level3
1234 2545 7894 if dslink.legacy_cd=7894.
thanks
Query in the transformer
Moderators: chulett, rschirm, roy
You don't need all those parens and shouldn't be checking for 0 or 1, simply let the booleans sort themselves out naturally:
Code: Select all
If Not(IsNull(DSLink2.DUNS_LEVEL_1)) And Not(IsNull (DSLink2.DUNS_LEVEL_2)) And IsNull(DSLink2.DUNS_LEVEL_3) Then DSLink2.LEGACY_CD Else DSLink2.DUNS_LEVEL_3
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers