Hi to all,
I have a data with 7 characters.i need to remove 1st character if it is 0.
Ex:
0123456 ---> 123456
0012345 ---> 012345
Could you please suggest me some tips?
to trim 1th char
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 43
- Joined: Mon Mar 03, 2008 10:58 pm
- Location: Chennai
to trim 1th char
Sathish Bhojan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
If Left(InLink.TheString,1) = "0" Then Right(InLink.TheString,6) Else InLink.TheString
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: 43
- Joined: Mon Mar 03, 2008 10:58 pm
- Location: Chennai
Thanks
Thaks ray.wurlod..What you have written is correct.If its non zero means can move same as the source.ray.wurlod wrote:What is to happen if the first character is non-zero? You did not includ ...Code: Select all
If Left(InLink.TheString,1) = "0" Then Right(InLink.TheString,6) Else InLink.TheString
Sathish Bhojan
-
- Participant
- Posts: 43
- Joined: Mon Mar 03, 2008 10:58 pm
- Location: Chennai
Re: Thanks
Hi ray,
Any other functions to achive this quit easier than what u gave before?
Any other functions to achive this quit easier than what u gave before?
Sathish Bhojan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not from me.
You want to write your own function then go ahead, it will encapsulate the expression logic I gave.
Whether or not U has any other ideas remains to be seen: U does not log in all that often.
You want to write your own function then go ahead, it will encapsulate the expression logic I gave.
Whether or not U has any other ideas remains to be seen: U does not log in all that often.
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.