Page 1 of 1

join different data type

Posted: Wed Feb 03, 2010 4:34 am
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.

Posted: Wed Feb 03, 2010 5:20 am
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.

Posted: Wed Feb 03, 2010 7:39 am
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

Posted: Wed Feb 03, 2010 7:40 am
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.