Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Issue with Lookup_Ext when possible match is NULL

$
0
0

I have stumbled upon a quirk with lookup_ext which is causing me a bit of greif. I need to do a very complex lookup and hit a roadblock with the last column compare. In this column it is possible to have a null value or a real value and this is where lookup_ext fails to match the records. Here is the example which is a simplified version of what I am doing, ;

 

Transaction Table

 

Record IDMatch_AMatch_BMatch_C
1GlovesLeatherBrown
2GlovesDrivingBrown
3GlovesLeatherNULL
4GlovesDrivingNULL
5GlovesNULLBrown
6GlovesNULLBlack

 

 

Look-up Table

 

Match_AMatch_BMatch_CSeasonStock_Ind
GlovesLeatherBrownWinterY
GlovesLeatherBlackWinterN
GlovesDrivingBrownSummerN
GlovesDrivingBlackSummerY
GlovesLeatherNULLWinterY
GlovesDrivingNULLSummerY
GlovesNULLBrownAny SeasonN
GlovesNULLBlackAny SeasonN
NULLLeatherBrownUnknownY
... and etc.

 

I am using the Lookup_ext wizard as I have to return multiple columns, however when I run the routine it always fails to match where Null = Null. I am thinking that lookup_ext wants to only match Null when you specify Is Null but in this case i can't do that. Here is the output that the above tables in the Match Routine would give me.

 

Record IDMatch_AMatch_BMatch_CSeasonStock_Ind
1GlovesLeatherBrownWinterY
2GlovesDrivingBrownSummerY
3GlovesLeatherNULLNULLNULL
4GlovesDrivingNULLNULLNULL
5GlovesNULLBrownNULLNULL
6GlovesNULLBlackNULLNULL

Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>