What does a lookup stage return for Character fields for unmatched key values?
I am trying to apply IsNull() function for a character value that is being returned from a DB2 table. But it is not working.
Do we need to set any environmental variable to make the IsNull function work?
Thanks in advance
Return values from Lookup stage
Moderators: chulett, rschirm, roy
For unmatched key values of Character fields, lookup stage returns NULL value. this is true only if you would select If Not Found property as CONTINUE in stage properties.
IsNull() function should work for charecter fields.do some cross checks..otherwise try isNull(input)=@true or simply use len(input)=0.
Edi
IsNull() function should work for charecter fields.do some cross checks..otherwise try isNull(input)=@true or simply use len(input)=0.
Edi
Hi,
a good practice IMHO would be also to:
build a test case and check it out,
write the results to a sequntial file and examine what you got in each case.
you might want to cross reference the results you got with any documentation you might find.
IHTH,
a good practice IMHO would be also to:
build a test case and check it out,
write the results to a sequntial file and examine what you got in each case.
you might want to cross reference the results you got with any documentation you might find.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
-
- Participant
- Posts: 75
- Joined: Tue May 13, 2003 4:14 am
- Location: California
- Contact:
1. APT_STRING_PADCHAR plays a very important part on this.
2. If you want to use NULL as a value to identified failed matches, you need to ensure that BOTH input and reference link fields are Nullable, along with the output link field for the lookup. Yes, you do need to set the 'Continue' option as mentioned earlier.
3. If you can not be nullable, or you are directly pulling from the database which is not nullable, then APT_STRING_PADCHAR is used to fill in the 'null' field. The null flag is NOT set in this case, even if the output link is nullable.
2. If you want to use NULL as a value to identified failed matches, you need to ensure that BOTH input and reference link fields are Nullable, along with the output link field for the lookup. Yes, you do need to set the 'Continue' option as mentioned earlier.
3. If you can not be nullable, or you are directly pulling from the database which is not nullable, then APT_STRING_PADCHAR is used to fill in the 'null' field. The null flag is NOT set in this case, even if the output link is nullable.