dbTalk Databases Forums  

lookup returning null

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss lookup returning null in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pm
 
Posts: n/a

Default lookup returning null - 11-10-2005 , 02:50 PM






I am using lookups in a DTS package. My problem is that Look up does
not differentiates between these two scenarios.

1. Found the key and it is mapped to null, so null is returned.
2. Key was not found, so null is returned.

In both cases null is returned. If I have to log the keys which were
not found, it becomes a little problematic.
Is there way around this other then to change the mapping table, so
that keys are never mapped to null.


Reply With Quote
  #2  
Old   
pm
 
Posts: n/a

Default Re: lookup returning null - 11-10-2005 , 03:42 PM






Sorry for confusion. Here is what i figured out.

lookups return empty string if key is not found or key passed is null.

but when i say

destination("col") = lookup ("unknown key")
destination("col") continues to have null. Its value does not changes
to empty string.

msgbox lookup ("unknown key")
though gives empty string.

Any ideas??

Thanks




pm wrote:
Quote:
I am using lookups in a DTS package. My problem is that Look up does
not differentiates between these two scenarios.

1. Found the key and it is mapped to null, so null is returned.
2. Key was not found, so null is returned.

In both cases null is returned. If I have to log the keys which were
not found, it becomes a little problematic.
Is there way around this other then to change the mapping table, so
that keys are never mapped to null.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.