Help with Lookups
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 15
- Joined: Wed Mar 29, 2006 1:55 am
Help with Lookups
I am going nuts with this guys... your help will be much appreciated.
What is the output of a Lookup stage (parallel) if no results are found matching the input? If we select "View data" it appears like a "null" value for this field, or like a 0-length string. Obviously these are different but for "View data" the appear the same. So I decided to open the output file itself with Ultraedit.
My field is a Char10 and if I check the output file physically it is a 10 null characters (hex 00 00) string. However, the Isnull function returns 0 (which means false). How can this be??
Thanks, best regards
Jose
What is the output of a Lookup stage (parallel) if no results are found matching the input? If we select "View data" it appears like a "null" value for this field, or like a 0-length string. Obviously these are different but for "View data" the appear the same. So I decided to open the output file itself with Ultraedit.
My field is a Char10 and if I check the output file physically it is a 10 null characters (hex 00 00) string. However, the Isnull function returns 0 (which means false). How can this be??
Thanks, best regards
Jose
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The output depends on your "failed lookup" rule. Sounds like you are using Continue.
In this case, the failed lookup link's columns are all set to NULL. This may be further affected by whether the receiving link's column definition specifies nullable or not and, where applicable, what its Null Field Value property is set to.
What you are seeing is two things in combination. The default NULL representation of 0x00 (ASCII NULL) and the pad character (default value also 0x00) being used to pad a Char field.
Use APT_STRING_PADCHAR to override the default pad character, and specify a Null Field Value property the same length as the Char datatype.
In this case, the failed lookup link's columns are all set to NULL. This may be further affected by whether the receiving link's column definition specifies nullable or not and, where applicable, what its Null Field Value property is set to.
What you are seeing is two things in combination. The default NULL representation of 0x00 (ASCII NULL) and the pad character (default value also 0x00) being used to pad a Char field.
Use APT_STRING_PADCHAR to override the default pad character, and specify a Null Field Value property the same length as the Char datatype.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 15
- Joined: Wed Mar 29, 2006 1:55 am
-
- Participant
- Posts: 15
- Joined: Wed Mar 29, 2006 1:55 am
-
- Participant
- Posts: 15
- Joined: Wed Mar 29, 2006 1:55 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For less than US$1 per week you CAN read the whole post.
They do have to fund this site. Premium memberships contribute only a small proportion of the actual running cost.
They do have to fund this site. Premium memberships contribute only a small proportion of the actual running cost.
Last edited by ray.wurlod on Tue Sep 05, 2006 4:50 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 15
- Joined: Wed Mar 29, 2006 1:55 am
-
- Participant
- Posts: 15
- Joined: Wed Mar 29, 2006 1:55 am