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

198 reads

Blogs

Flyway Desktop Projects for My PoC

By

In a previous post, I set up the basic databases for the PoC project...

Daily Coping 30 Jan 2023

By

Today’s coping tip is to plan something fun and invite others to join you....

Migrating or Recovering a TDE Protected Database 

By

When encrypting a database with Transparent Data Encryption (TDE), a vital consideration is to...

Read the latest Blogs

Forums

Microsoft SQL over IPSEC VPN TPLink routers - 2 locations

By cpaphouse

Hi Experts. We recently set up a second location. our software at our first...

Database copies (cross environment) and sizing strategies for 2019

By MyDoggieJessie

I'm sure this has been asked many, many, many times and hoping several optimal...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers