Technical Article

Pad Number

A simple UDF for padding out numbers with a specific character (eg: pad 3 to show as 003).Usefull when you can only sort as a text item or for formatting purposes.Script is similar to the SPACE() function but allow the padding character to be defined.Usage:dbo.padNumber('string to pad', padsize, padchar)eg:SELECT dbo.padNumber('53', 4, '0') as testNumReturns:testNum-------0053

2003-07-25

197 reads

Blogs

Trusting the Fine Print or connecting Azure Data Factory with Salesforce

By

(2022-Jan-19) David Eldersveld once said that a “cool solution is a completely insecure solution” -...

Creating a new User-Defined Data Type–#SQLNewBlogger

By

Another post for me that is simple and hopefully serves as an example for...

A new chapter begins

By

In 2012 when I originally founded Born SQL, I never imagined I would find...

Read the latest Blogs

Forums

when execute query it take 32 second to return 2 rows so how to solve slowly iss

By ahmed_elbarbary.2010

I work on sql server 2017 i face issue when run simple query it...

Recursive Triggers

By Ken at work

I know there is, somewhere, T-SQL that will allow me to update (keep in...

How to get cummulative sum per column?

By Barendrecht82

Hi, I have a statement per period. I want the periods to be cumulate. ...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers