JeffMachine
MIS
I am writing a query and I have a field (voucher, nvarchar(20)) whose data looks as follows:
00002_vir
00003_vir
00012_vir
200001_vir
Basically, I need to strip off the "_vir" and left pad to 8 places with zeros and I need some syntax help.
So the end result of the query would look like:
00000002
00000003
00000012
00200001
Any help would be appreciated. Thanks....
00002_vir
00003_vir
00012_vir
200001_vir
Basically, I need to strip off the "_vir" and left pad to 8 places with zeros and I need some syntax help.
So the end result of the query would look like:
00000002
00000003
00000012
00200001
Any help would be appreciated. Thanks....