Page 1 of 1

Define decimal(2,5) in datastage ?

Posted: Wed Aug 29, 2018 7:31 am
by kmare
Hi Gurus,

I have an attribute which talks about INTEREST_PERCENTAGE(15.12345) , is there a way to define a column as decimal(2,5) in datastage,
as a basic standard that precision can be equal are greater than scale.
Please provide your valuable inputs.

Thanks
Kishore

Posted: Wed Aug 29, 2018 8:33 am
by chulett
Sure. Are you having a problem specific to this attribute? Also curious if you are manually creating the metadata as the import of same should set that up properly for you.

Posted: Thu Aug 30, 2018 2:06 am
by kmare
Hi Craig,

I will have to define this attribute manually in datastage and in netteza and yes my parallel job do not compile when I defined like decimal(2,5).

Posted: Thu Aug 30, 2018 4:22 am
by qt_ky
That looks more like a decimal(7,5) because you've got 7 digits in total with 5 after the decimal.

Precision is the number of digits.

Scale is the number of digits to the right of the decimal point.

Posted: Thu Aug 30, 2018 5:31 am
by kmare
Hi ,
That is correct qt_ky .
I convinced my business that Decimal(2,5) do not fit in ETL world :D :D .
and defined as decimal (7,5)
closing the thread !!

Posted: Mon Sep 03, 2018 9:26 am
by ray.wurlod
Decimal(2,5) does not fit anywhere.

The first number (precision) is the number of significant digits.
The second number (scale) is the number of digits after the decimal place.

You can't have five digits after the decimal place if you only allow two significant digits.

Posted: Mon Sep 03, 2018 1:11 pm
by chulett
From what I've seen, not every system includes the scale in the precision. The vast majority, yes, but it's not an absolute from what I recall. Just don't ask me to clarify where, though, it's just something waving weakly from the back of my mind for attention. :wink: