SELECT RIGHT('000000' + CAST(INVOICEID AS varchar), 6) FROM TBLINVOICE
The Cast function is not necessary if InvoiceId is already a character
field.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.