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

Daily Coping 16 May 2022

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

SQL Saturday Jacksonville Slide Decks

By

Here are the slide decks for my sessions at SQL Saturday Jacksonville 2022 Continuous...

Power BI connectors to Azure Synapse

By

When using Power BI and pulling data from Azure Synapse, you will use the...

Read the latest Blogs

Forums

Unable to connect to named instance.

By ps.

There is a server running SQL Server 2012 32 bit. This is the default...

PBALP User in SQL Server

By rogue1009

Hi Everyone, Currently looking at tidying up some SQL servers and i have a...

Filetred index

By aureliu

\hello Guys,   Mayyou help wuth the corect index filetred creation using modulo?  ...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers