My source is double data type and using dFloatToDecimal function to send to target column decimal(16,12), i get warning message for the source data value of 13456.123456789012 and its displayed as zeroes but when i change target column to decimal(16,11) no warning but value is rounded. Even if i increase the size to decimal(20,20) i see zeroes there only. i want to understand How is data stored in decimal in datastage and how can i fix it, if anyone can comment please.
Thanks in advance.
Double to Decimal Data Type Issue
Moderators: chulett, rschirm, roy
Re: Double to Decimal Data Type Issue
First point
Your sample data is 13456.123456789012
Your target column decimal(16,12) /decimal(16,11)
It is not correct. Is it the real data or you gives some data for example?
Your sample data is 13456.123456789012
Your target column decimal(16,12) /decimal(16,11)
It is not correct. Is it the real data or you gives some data for example?
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Final Conclusion
To get rid of this Warning:
APT_CombinedOperatorController,2: Conversion error calling conversion routine decimal_from_dfloat data may have been lost
and Following this rule:
Precision is number of digits and scale is number of digits to the right of the decimal.
scale/decimal value (right part of decimal) first uses total no of precision/digits size as defined in the column defintion and remaining precision/digits size is provided for left part of decimal.
Example:
12345.123456789012 will fit into Numeric(17, 12) because total Precision/Digits size is 17 and after decimal size is 12 and before decimal size is 5.
this value willnot fit into Numeric(16, 12) as per rule and will issue above mentioned warnig.
APT_CombinedOperatorController,2: Conversion error calling conversion routine decimal_from_dfloat data may have been lost
and Following this rule:
Precision is number of digits and scale is number of digits to the right of the decimal.
scale/decimal value (right part of decimal) first uses total no of precision/digits size as defined in the column defintion and remaining precision/digits size is provided for left part of decimal.
Example:
12345.123456789012 will fit into Numeric(17, 12) because total Precision/Digits size is 17 and after decimal size is 12 and before decimal size is 5.
this value willnot fit into Numeric(16, 12) as per rule and will issue above mentioned warnig.