Padding character field with leading zeros


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. STUFF( <FIELD name>, 1, 0, REPLICATE( '0', <desired length> - LEN( <FIELD name> ) ) )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.