Datasummit
  • Home
  • About
  • Services
  • Contact
  • Blog
    • Reporting
    • MySql
    • Sage
    • Informix
    • ERP
    • General

Cool way to add a leading zero to a single digit integer

Business Analysis, BI and Reporting, Project Management

  • Home   /  Blog   /  MS SQL   /  
  • Cool way to add a leading zero to a single digit integer

Cool way to add a leading zero to a single digit integer

Jun 13,2017 Comments Off on Cool way to add a leading zero to a single digit integer

As long as n is strictly less than 100:

RIGHT(100+n,2)

(Yes, now it seems obvious..  🙂
Kudos to Steve Kass

 

Blog Categories

  • ERP
  • General
  • Informix
  • MS SQL
  • MySql
  • Reporting
  • Sage
  • Syspro
  • Uncategorized