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(coun ter,5)
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)+
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.