Page 1 of 1

Default Value for Decimal Lookup Output

Posted: Mon Jun 07, 2010 4:01 am
by devidotcom
Hi All,

The output of my lookup stage is Decimal(5) Null. Will DataStage not give output as Null when the lookup fails. It loads 0 instead.

Please confirm.

Thanks

Posted: Mon Jun 07, 2010 5:19 am
by ArndW
It will use 0 if the field is non-nullable.

Posted: Mon Jun 07, 2010 6:10 am
by devidotcom
If it is nullable, it loads 0...

Is this right?

Posted: Mon Jun 07, 2010 6:32 am
by ArndW
I can't check right now, but on lookups I would think it returns NULL for nullable fields.

Posted: Mon Jun 07, 2010 10:00 am
by anbu
The value of target field depends on the nullability of reference field in lookup.

If the reference field in lookup is null then you you will get null in target field if there is no match.

If the reference field in lookup is not null then you will get zero in target integer field if there is no match.