Hi all,
1. i would want to know wat function i need to use to convert a string value to integer value.
2. Also i get this warning, wen i ran my job:
APT_CombinedOperatorController,0: APT_Decimal::operator=: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal.
can any one pls answer my questions?
Thanks in advance!
Data type conversion function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 34
- Joined: Fri Sep 22, 2006 10:59 pm
- Location: India
Hi,
If your input contains only integers then use the function 'AsInteger'. This will treat the given value as Integer.
Is your input column having any decimal values? If it is, then you can go for the function 'StringToDecimal'. (Since you have mentioned some decimal precision warnings).APT_CombinedOperatorController,0: APT_Decimal::operator=: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal.
If your input contains only integers then use the function 'AsInteger'. This will treat the given value as Integer.
Regards,
Balaji.
Balaji.
-
- Participant
- Posts: 34
- Joined: Fri Sep 22, 2006 10:59 pm
- Location: India
-
- Participant
- Posts: 34
- Joined: Fri Sep 22, 2006 10:59 pm
- Location: India
Hi,
I think you are in wrong way. Are you hardcoding the metadata? If yes, this is not a good practice to do so. Always it is better to import the meta data through Datastage Manager is the good way.
Hope this will help you....
I think you are in wrong way. Are you hardcoding the metadata? If yes, this is not a good practice to do so. Always it is better to import the meta data through Datastage Manager is the good way.
I think for this you should mention the lenght as 11 and precision as 2. In the length column you should mention the full length of the column including precision part and in the precision part you want to mention the column precision(no. of digits after decimal part).length precision
for a decimal value wth length as 9 and precision 2, i shuld define in datastage as below rite? correct me if i am wrong ...
length precision
9 7
Hope this will help you....
Regards,
Balaji.
Balaji.