hi my problem is that,
we r reading frm a flat file and the digits are seperated by commas and we need to remove the commas ex
1,500.00 is to be formatted to 1500.00.
tell me the solution using enterprise edition as well as server edition
thankyou
how to remove commas ?
Moderators: chulett, rschirm, roy
Hi
In Server there are so many ways to do this. The easiest is to replace , with nothing. Also you can use Oconv(Oconv(Input,"MCN"),"MD2") to convert it to your format.
In Server there are so many ways to do this. The easiest is to replace , with nothing. Also you can use Oconv(Oconv(Input,"MCN"),"MD2") to convert it to your format.
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Participant
- Posts: 21
- Joined: Sun Jul 18, 2004 11:32 pm
Re: how to remove commas ?
[quote="jayawant_hsbc"]hi my problem is that,
we r reading frm a flat file and the digits are seperated by commas and we need to remove the commas ex
1,500.00 is to be formatted to 1500.00.
tell me the solution using enterprise edition as well as server edition
thankyou[/quote]
Try using
Oconv(IConv(To_T.Salary,"MD2"),"MD2")
Regards
Naren
we r reading frm a flat file and the digits are seperated by commas and we need to remove the commas ex
1,500.00 is to be formatted to 1500.00.
tell me the solution using enterprise edition as well as server edition
thankyou[/quote]
Try using
Oconv(IConv(To_T.Salary,"MD2"),"MD2")
Regards
Naren
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The fastest solution is Convert(",", "", TheNumber) - to which rasi alluded.
This function is available in both server and enterprise (parallel) editions.
For mainframe (390) jobs the CONVERT function is not available; you would need to manufacture something using POSITION, SUBSTRING and CHARACTER_LENGTH built-in functions.
This function is available in both server and enterprise (parallel) editions.
For mainframe (390) jobs the CONVERT function is not available; you would need to manufacture something using POSITION, SUBSTRING and CHARACTER_LENGTH built-in functions.
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.