View Single Post
  #10 (permalink)  
Old 06-27-07, 02:36
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,563
I think ankursmart is correct. First replace banks with 0, then ltrim and rtrim spaces and final replace reminding (non-leading) spaces to 0.

I had similar problem few months ago. Beside removing leading 0 I had to align text to the right site and the final string had to be exactly 10 characters long.

Sample (before):
Code:
000000000011.11
000000000222.22
Sample (after):
Code:
     11.11
    222.22
If I remember correctly beside replace, ltrim, rtrim, replace functions I have also used length, case and space functions.

Hope this helps,
Grofaty

Last edited by grofaty; 06-27-07 at 02:42.
Reply With Quote