Integer to decimal and then to integer
Posted: Mon Oct 10, 2011 5:19 pm
I have couple of questions on Integer to Decimal and decimal to integer.
I know decimal (5,2) represents 3 digits before decimal point and 2 digtits after the decimal point.
so total is 5.
In case of Integer(5) it seems to hold more than 5 digits. I would like to understand the concept of small int, integer with different values and big int.
What values it can hold. Please explain or point me to some documentation specifically in regards to datastage.
Also I noticed when the database (DB2) has column definition as integer(4) why does datastage takes it as integer(10) during table definition import.
Also during coding i have source column as integer(10) when i move through the aggregator i converted it to decimal(10,0) and then later on converted decimal(10,0) to integer(10) in a transformer with out using any functions i.e implicit conversion by datastage. In this method am i truncating any data.
Note: I want the data in the final output as 1 not like 0001. I would like to do this using transformer unless its absolutley neccessary.
I have checked DS forums could find anything helpful.
And also i have a suggestion for DSXchange forums.
Like if i have a question which was asked earlier by someone else then the other users reply back saying use search.
And when you search say you find 25 topics related. And in 24 of them it will be written to do search. So a person has to go through 24 not-needed forums to get to the right one.
Can we have some special tag or something to find this answered one. So, that it saves time of going to unnceccary topics.
I know decimal (5,2) represents 3 digits before decimal point and 2 digtits after the decimal point.
so total is 5.
In case of Integer(5) it seems to hold more than 5 digits. I would like to understand the concept of small int, integer with different values and big int.
What values it can hold. Please explain or point me to some documentation specifically in regards to datastage.
Also I noticed when the database (DB2) has column definition as integer(4) why does datastage takes it as integer(10) during table definition import.
Also during coding i have source column as integer(10) when i move through the aggregator i converted it to decimal(10,0) and then later on converted decimal(10,0) to integer(10) in a transformer with out using any functions i.e implicit conversion by datastage. In this method am i truncating any data.
Note: I want the data in the final output as 1 not like 0001. I would like to do this using transformer unless its absolutley neccessary.
I have checked DS forums could find anything helpful.
And also i have a suggestion for DSXchange forums.
Like if i have a question which was asked earlier by someone else then the other users reply back saying use search.
And when you search say you find 25 topics related. And in 24 of them it will be written to do search. So a person has to go through 24 not-needed forums to get to the right one.
Can we have some special tag or something to find this answered one. So, that it saves time of going to unnceccary topics.