Skip to content

Jim Salasek's SQL Server Blog

Sharing what I learn about Sql Server

  • Home
  • About
  • Contact

Recent Posts

  • Terminate SSIS Jobs: A Step-by-Step Guide January 7, 2025
  • Copy SQL Server tables between servers easily with dbatools. December 17, 2024
  • Master Filtering in SSMS: Quick Database Object Access December 3, 2024
  • Find SQL Server Tables with Identity Columns Easily November 12, 2024
  • How to find all jobs that call a stored procedure. June 4, 2024
December 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Jan    

Tag: create leading zero

Zero pad a string

If you have ever used Oracle and needed to create a string padded with zero’s, they have a nifty function called LPAD which allows you to do this easily.  In SQL Server we need to create our own way.

Continue reading Zero pad a string

Posted on June 2, 2020April 12, 2020Categories Hints and TipsTags create leading zero, lpad string, sql serverLeave a comment on Zero pad a string
Create a website or blog at WordPress.com
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Jim Salasek's SQL Server Blog
    • Join 34 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Jim Salasek's SQL Server Blog
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar