Don Frazier

zPad() - add leading zeros to a number

This user-defined function converts a number to character format and adds leading zeroes to pad the field to a specified length.  useful for displaying SSNs or other numeric fields where the leading 0's are significant but the field is stored as numeric.To use:select dbo.zPad(, )make sure your length includes an extra column for the sign.  […]

2002-12-05

277 reads

Convert a number to words

This is a handy function that converts a  number (integer) into its word format.  This might be handy if you need to print a check formatted number in words.  Currently it supports an integer but it would be almost nothing to convert to support a bigint or decimal.The components are1) a table named PlaceValue that […]

2002-12-04

205 reads

PACK() user defined function

Convert a decimal number to IBM EBCDIC packed decimal format.  If for some reason you need to export a number to IBM systems in native format, you can define a SQL Server field as binary(8) and Pack() your decimal number into it.  Then IBM mainframes and COBOL/CICS systems can read the numbers from your data […]

5 (1)

2002-12-04

206 reads

Blogs

Using Azure Data Factory Mapping Data Flows to populate Data Vault

By

(2019-May-24) Data Flow as a data transformation engine has been introduced to the Microsoft Azure...

New Azure “SQL Server settings” blade in the Azure Portal

By

I just noticed today that there is a new blade in the Azure portal...

Mass Backup All Sessions

By

Migrating Extended Event Sessions from one server to another should be a simple task....

Read the latest Blogs

Forums

The Change Failure Rate

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Change Failure Rate

Need help with query where i need to aggregate an aggregate

By stuart.davison 8016

Hi all, I have an inherited system which I can't do much with so...

Buffer Pool calculation

By avpco

Hello Colleagues. Could you tell me about how MS SQL Server 2016 SE determines...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers