LookUp Problem
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3
- Joined: Sat Dec 01, 2007 7:18 pm
- Location: India
LookUp Problem
Iam trying to lookup a char(1) column with varchar(30) column. But iam not getting null for not matched record in the lookup. When iam looking the records in the dataset after lookup, iam having a blank field but it is not null. I need null when the column is not matched.Please anyone give me an idea what is happening there??
Welcome to DSXchange, arunselvaraj.
(that red is very difficult to read)
If the column coming from the lookup is declared as nullable=Yes and your lookup is set to "continue" on failed lookups then the value will be null. What are your nullability settings in your job and please explain which column is Char and which VarChar?
(that red is very difficult to read)
If the column coming from the lookup is declared as nullable=Yes and your lookup is set to "continue" on failed lookups then the value will be null. What are your nullability settings in your job and please explain which column is Char and which VarChar?
-
- Participant
- Posts: 3
- Joined: Sat Dec 01, 2007 7:18 pm
- Location: India
Iam looking up column named start_c char(1) from a dataset with nullable=no and code_val_c varchar(30) from a db2 stage with nullable=no.My lookup is set to "continue" on failed lookups. Iam getting all the matched and unmatched from the lookup. But while checking the nullability for the unmatched records in transformer, i came to know tat null are not coming for the unmatched one.
I checked with isnull(Code_val_c) in transformer. But iam getting only 0. Then i came to know tat null is not coming
I checked with isnull(Code_val_c) in transformer. But iam getting only 0. Then i came to know tat null is not coming
-
- Participant
- Posts: 3
- Joined: Sat Dec 01, 2007 7:18 pm
- Location: India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I think you need to step back and look at what ArndW said. FRom your description not sure if you are using a lookup fileset or a db2 stage directly, but the field in the lookup must be created nullable (assuming fileset) and the metadata in the job at hand also set this way. Basically all of the fields, input, lookup, output side of lookup must be created as nullable to get this to work correctly...I see it all the time here (ver 7.5.1a)
William Wolf
Wolf Consulting
612-719-9066
Wolf Consulting
612-719-9066