Hi,
I'm facing problem in converting Decimal(9,0) to Varchar(20).My design is as below:
DB2 stage------->Modify stage------>DB2 stage
In modify stage I have specified as INTERNET_ORDER_NBR=string_from_decimal (INTERNET_ORDER_NBR)
I'm getting output as
049351929.
049342258.
But the required output is
49351929
49342258
Can anyone help me how to get this result..
Thanks,
KalpanaM
Conversion from Decimal to varchar
Moderators: chulett, rschirm, roy
Conversion from Decimal to varchar
Kalpana Marupudi
Re: Conversion from Decimal to varchar
if you get 0xxxx as your input link
you can transtype your decimal to integer then it will be like xxxx and then transtype it to string
the other option is do a simple maping by transformer do not use modify
Arash
you can transtype your decimal to integer then it will be like xxxx and then transtype it to string
the other option is do a simple maping by transformer do not use modify
Arash
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What you get and what you expect are equivalent. Decimal representation in DataStage includes leading and trailing non-significant zeroes and placeholder to prove that precision and scale are being managed correctly. You can remove each with Trim() functions or, if you are 100% certain that there are always eight significant digits, with substring operator.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
no when I queried the DB2 table using IBM data studio 2.2,I'm getting the result displayed asray.wurlod wrote:What you get and what you expect are equivalent. Decimal representation in DataStage includes leading and trailing non-significant zeroes and placeholder to prove that precision and scale are being m ...
049351929.
049342258.
but the required output should be
49351929
49342258
Thanks & Regards,
Kalpana.
Kalpana Marupudi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: