The filed length is varchar(7) I just want to set 0 before the ID number, for all rows as below:
TraineeID TraineeID
74 0000074
1290 0001290
51315 0051315
Please help.
Regards Mir
The filed length is varchar(7) I just want to set 0 before the ID number, for all rows as below:
TraineeID TraineeID
74 0000074
1290 0001290
51315 0051315
Please help.
Regards Mir
Try LPAD:
SELECT LPAD(TraineeID,7,'0');