Skip to content

Jim Salasek's SQL Server Blog

Sharing what I learn about Sql Server

  • Home
  • About
  • Contact

Recent Posts

  • Msg 4701, Level 16 trying to truncate table through Linked Server February 2, 2021
  • Msg 7399, Level 16, State 1 Linked Server. Access Denied January 5, 2021
  • Another feature I wish SQL Server had. December 3, 2020
  • Msg 8115, Level 16 Arithmetic overflow November 4, 2020
  • SQL Server Columnstore Index Performance Benefits October 6, 2020
February 2021
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
« 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