Define decimal(2,5) in datastage ?

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
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Define decimal(2,5) in datastage ?

Post 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
Kishore
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Post 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).
Kishore
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post 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.
Choose a job you love, and you will never have to work a day in your life. - Confucius
kmare
Participant
Posts: 11
Joined: Wed Dec 02, 2009 3:44 am
Location: Kothagudem

Post 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 !!
Kishore
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

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