Calculating Percentage Change

To provide data analysis you may need to perform some basic trend analysis. For example, if you want to identify the percentage of change in the number of orders received from one month to the next. The challenge to providing that on the fly is the change can be either an increase or a decrease, […]

5 (1)

2007-03-02 (first published: )

2,426 reads

Validating Canadian Postal Codes

For fellow Canadians and neighbours to the south, you may find useful a function to validate the formatting of a Canadian postal code.  More than once I've had to work with web programmers on checking that a postal code meets the A1A1A1 style, so carry around a function that simply returns a true/false bit if […]

2007-01-15 (first published: )

288 reads

Formatting Dates

There are many ways to format dates, and rather that reinvent the wheel each time I've found it helpful to have a user defined function always available. As a function it of courses processes on each row, and to enable the most flexibility the formatting style is passed simply as a parameter. Year month and […]

2005-08-31 (first published: )

450 reads

Automatically Restoring from Production

Came across a great script from Ken Kaufman on copying backups using xp_cmdshell.  Thought I'd contribute a script I wrote that builds on that to restore the latest production backup to a testing or development server.  In this case I routinely create all my production backups to a network share and then use that source […]

2002-12-16

629 reads

Blogs

Containers: Working With Volumes

By

In the previous two posts on containers I showed how use Docker commands to...

Speaking at PASS Summit 2019

By

I am delighted to announce that I have been selected to speak at the...

High Security Prices–Always Encrypted 2019 needs Datacenter Edition

By

I was recently doing some work on Always Encrypted in SQL Server 2019 and...

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

TSQL query not working properly against Full Text Index

By SQLMantra

Hi, I've been having this issue for quite some time and need some help...

Query help on Pivoting on two columns

By s-sql

DECLARE @RegionCounts Table ( TYear char(2), Region varchar(30), RowCnt int ) Insert into @RegionCounts...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers