Hi,
Converting a decimal to string (reading from teradata source, writing to XML file),
TgtCol:String[10]=string_from_decimal[fix_zero](SrcCol)
SrcCol = 2.56
The result os ' 000002.56' is there a way to avoid the leading space and have a 0 instead?
Thanks,
Decimal to String (TD to XML file)
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
Decimal to String (TD to XML file)
Thanks,
Vinay
Vinay
The string_from_decimal doesn't have an option to suppress the sign character so you will always get it and need to remove it. A modify stage can't use embedded functions, but you could put another modify stage with a trim() to get rid of the leading spaces or just a substring function to get rid of the first char or a replace function to replace the leading space with a "+" sign or "0".
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
![Idea :idea:](./images/smilies/icon_idea.gif)
It is my belief (originally suggested by an Ascential technical person) that two consecutive Modify stages are slightly less efficient than a single Transformer stage.
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.