I have a colum LocationID which is varchar(10) and I need to convert them to NewLocation
Location_ID NewLocation
123 00123
2233 02233
42345 42345
22 00022
10 00010
Select (Concat('00'+Location_ID)) as NewLocation
from tablelocation;
My concat statement can not evaluate when to place one zero or two zero in front of location_ID. The goal is to make 5 digit location_ID.