Link to home
Start Free TrialLog in
Avatar of BenjaminWong
BenjaminWong

asked on

How to insert zero into space

Hi expert,
I need to run a sql scrip to join 2 fields in a new field called customerno.  The customerino is a 8-digit field starting with Alphabet ranging from 1 to 3, and is followed by 5 numeric.  Any space between Alphabet and numeric should be filled with zero; example below:
    customerno F0000567,
    customerno FA001234,
   customerno :FAS12345
   customern0 :F0000004

I used the following scrip but I could not get the result I want, any pointers?:

set customerno=left(Prefix,3)+right(counter,5)
ASKER CERTIFIED SOLUTION
Avatar of Cakinci
Cakinci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial