join different data type

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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

join different data type

Post by dnat »

Hi

I have a col which is coming as integer in the input and the same col in reference is defined as decimal. When i join source and reference using this column as the key, what will be the situation. should it join or should it not join.

The value from souce is 10
The value from target is 10.00

For some of the records it is joining, and for some it is not joining. I didnt change the datatype either from source or reference, but want to know whether i need to handle this using a function and then use this as a key for join.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

DataStage will perform an implicit conversion, but it is much better to perform the conversion yourself explicitly, i.e. by convertig your decimal to an integer and then doing your join.
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post by abhijain »

It always advisable to make datatype identical for JOIN. Change any of your column datatype (either Source or Reference) and then perform JOIN operation
Last edited by abhijain on Mon Feb 08, 2010 4:13 am, edited 2 times in total.
Rgrds,
Abhi
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post by abhijain »

It's always advisable to make datatype identical for Join/Lookup/Merge operations. Change any of your column datatype (either Source or Reference) and then perform JOIN operation.
Rgrds,
Abhi
Post Reply