Default Value for Decimal Lookup Output

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Default Value for Decimal Lookup Output

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It will use 0 if the field is non-nullable.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

If it is nullable, it loads 0...

Is this right?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I can't check right now, but on lookups I would think it returns NULL for nullable fields.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post 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.
You are the creator of your destiny - Swami Vivekananda
Post Reply