A scenario in lookup stage

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
prematram
Participant
Posts: 14
Joined: Fri Dec 14, 2007 2:01 am
Location: Chennai

A scenario in lookup stage

Post by prematram »

Hi,
In lookup stage,i used varchar column - MEM_ID as key column.
The values of this column MEM_ID in main file and ref file is as follows.

MEM_ID - varchar2(5)

Main File:
=======
MEM_ID MEM_NAME
1 prem
2 surendar

Ref File
=====
MEM_ID COV_ID
01 100
02 200


What would be the result..?? does the key column matches and output the 2 rows or no result is produced due to leading zeros in the ref file...

what will happen..??
Prem R.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

No result will come out. To get the successful lookup either you convert the MEM_ID to numeric datatype or remove the leading zeors.
Birendra
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

bkumar103 wrote:No result will come out. To get the successful lookup either you convert the MEM_ID to numeric datatype or remove the leading zeors.
Even u convert MEM_ID to numeric data type it wont match the ref. data set,u have to remove leading zeros......
prematram
Participant
Posts: 14
Joined: Fri Dec 14, 2007 2:01 am
Location: Chennai

RE:

Post by prematram »

Thanks to all....

Prasson...i think when we put it as numeric type,it wont take leading zeros..i tried that solution..its working... r u sure prasson...??
Prem R.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

prasson_ibm wrote:Even u convert MEM_ID to numeric data type it wont match the ref. data set,u have to remove leading zeros......
Numeric data types don't have "leading zeroes".
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply