Decimal to String conversion in modify stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 40
- Joined: Tue Nov 11, 2008 5:49 am
Re: Decimal to String conversion in modify stage
can you tell what is your input decimal field length?
Knowledge is Fair,execution is matter!
-
- Participant
- Posts: 40
- Joined: Tue Nov 11, 2008 5:49 am
Re: Decimal to String conversion in modify stage
i am getting the exact output as what you required, find my specification for conversion
UPC:string[20] = string_from_decimal [suppress_zero](UPC)
and the output is
Peek_24,0: UPC:49049716
check your column definition in the output tab of modify stage, and before modify stage also, am not sure why you are not getting exact result
UPC:string[20] = string_from_decimal [suppress_zero](UPC)
and the output is
Peek_24,0: UPC:49049716
check your column definition in the output tab of modify stage, and before modify stage also, am not sure why you are not getting exact result
Knowledge is Fair,execution is matter!
Re: Decimal to String conversion in modify stage
Yes,Thanks for your timely response and now i'm getting the exact required output.
Kalpana Marupudi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
string[20] is Char(20) - DataStage will right pad. If you use string[max=20] (which is VarChar(20)) the trailing pad characters will not be applied. You will always get leading and trailing non-significant zeroes that indicate the full precision and scale of the decimal number - you can remove these using string_trim() function, but probably not in the one Modify stage expression.
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.
-
- Participant
- Posts: 40
- Joined: Tue Nov 11, 2008 5:49 am