Page 1 of 1

Sparse lookup with other tahn varchar fields.

Posted: Wed May 27, 2009 5:19 am
by swathi Singamareddygari
Hi all,

I am facing problem with sparse lookup.
If i do sparse lookup with a key field having datatype Decimal (other than varchar ) ,even though matching records are there in the reference table,lookup is not working.

But if i do the same thing with key field having datatype varchar its working

If any one knows please help me .

Thanks for your help.

Posted: Wed May 27, 2009 5:26 am
by miwinter
What are the datatypes on your primary and reference links? If they are both Decimal, are they of equal precision and scale?

Posted: Wed May 27, 2009 5:40 am
by nagarjuna
swati ,
please note that whatever datatypes present in reference link should match with the primary link .

Posted: Wed May 27, 2009 6:20 am
by swathi Singamareddygari
Hi ,

Thanks for your responses.
The datatype of the fields in both link are same and it is decimal(4,0).

I tried converting both fields to varchar and then doing lookup that time its working fine,

I am not getting what's wrong with decimal datatype.

Posted: Wed May 27, 2009 6:38 am
by miwinter
Can you peek out some of the problem records failing to make a match, to see actual values, when you define them as decimals?

Posted: Wed May 27, 2009 7:19 am
by swathi Singamareddygari
Hi all,

Thanks for your responses,

My problem got sloved,actually the datatype is decimal(4,0),
datastage is treating it as integer because the scale is zero,
So if i change it to integer its working fine.

Thanks for your help