Page 1 of 1

A scenario in lookup stage

Posted: Mon Sep 08, 2008 3:26 am
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..??

Posted: Mon Sep 08, 2008 5:43 am
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.

Posted: Mon Sep 08, 2008 6:51 am
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......

RE:

Posted: Mon Sep 08, 2008 7:07 am
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...??

Posted: Mon Sep 08, 2008 7:36 am
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".