Data Warehousing Community Forum
February 08, 2012, 11:09:34 am

Pages: [1]   Go Down
  Print  
Author Topic: Lookup expression avoid null value  (Read 1108 times)
shankar.singu
DW Fresher
*

Reputation: +6/-0
Offline Offline

Posts: 16


View Profile
« on: May 27, 2010, 04:54:45 pm »

Hi,

1.   I have productDetails Table with ProductID and ProductName columns
2.   The productDetails table is my lookup table. I have given input port product_id (from another source) and in lookup expression condition given ProductID = product_id.
3.   When product_id does not exist in product table, the lookup will return productName as null value.
4.   I wanted to skip this meaning When the product id does not exists in lookup table then I don’t want to keep product name as null in target.

Can anyone pls tell me how to avoid?

Regards,

Sankar. S
Logged
srikanth471
DW Fresher
*

Reputation: +0/-0
Offline Offline

Posts: 1


View Profile
« Reply #1 on: May 30, 2010, 04:47:34 pm »

hi

   Generally when  ur looking up into a table , if the i/p link to the look up doesn't match with the look up table data it will reject it. no need to specify for it.
Logged
shankar.singu
DW Fresher
*

Reputation: +6/-0
Offline Offline

Posts: 16


View Profile
« Reply #2 on: May 31, 2010, 10:54:57 am »

Hi,
Not able to follow your words "look up table data it will reject it". Pls explain with an example which would help to understand easily.

The actual scenario is very simple,
-----------------------------
Lookup Table: ProductDetails
-----------------------------   
ProductID   ProductName
=========================
1234                 Lux
1235                 Hamam

I will pass ProductID 1234 and get /return productName (now Lux). 
in TargetTable the value would be

ProductCode   ProductDescription
============================
1234                    Lux


But if I pass productId value 3333 then I will get productName which is nothing but null since the product id does not exist in lookup table.

Now the target table.

ProductCode   ProductDescription
============================
1234                      Lux
3333   

Now my question is how to avoid to keep null value in ProductDescription.  Is there any way to handle this problem in lookup transformation itself instead of using any addtional transformation.

Regards,
Sankar. S

Logged
Pages: [1]   Go Up
  Print  
 
Jump to: