Hi ,
My input data is as follows:
Col A ( Number)
1,002.03
123,002.34
1,234,002.96
How do I remove comma (,) from numbers in datastage.
I know I can remove it using Unix but can it be done using Datastage?
My desired output is:
1002.03
123002.34
1234002.96
Thanks for all your help!
How to remove comma from numeric field
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 23
- Joined: Wed Sep 10, 2008 4:46 pm
- Location: USA
How to remove comma from numeric field
Focus on ABC: Audit , Balance and Control..
Use the CONVERT() function.
Code: Select all
CONVERT(",","",in.numericfield)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Iconv(InLink.TheNumber, "MD2")
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.
-
- Premium Member
- Posts: 23
- Joined: Wed Sep 10, 2008 4:46 pm
- Location: USA
Target is a flat file with which We need to perform mathematical calculations using datastage.chulett wrote:I'm curious as to the 'why' of this... is the target of your 'desired output' a database table for instance? Flat file? Something else entirely?
Thanks for all your help!
Focus on ABC: Audit , Balance and Control..
-
- Participant
- Posts: 14
- Joined: Mon Mar 23, 2009 12:57 am
- Location: INDIA
Re: How to remove comma from numeric field
Hi,
Use the function Ereplace (string, substring, replacement )
In your case it would be Ereplace(Col A,',','')
Regards
Boss :D
Use the function Ereplace (string, substring, replacement )
In your case it would be Ereplace(Col A,',','')
Regards
Boss :D
csc.datastage wrote:Hi ,
My input data is as follows:
Col A ( Number)
1,002.03
123,002.34
1,234,002.96
How do I remove comma (,) from numbers in datastage.
I know I can remove it using Unix but can it be done using Datastage?
My desired output is:
1002.03
123002.34
1234002.96
Thanks for all your help!
DS Info
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: