Technical Article

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: )

5,899 reads

Technical Article

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: )

863 reads

Technical Article

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: )

457 reads

Technical Article

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

638 reads

Blogs

Setting up SQL Server 2022 s3 Object Storage Integration using MinIO with Docker Compose

By

In this blog post, I’ve implemented two example environments for using SQL Server 2022’s...

Daily Coping 12 Aug 2022

By

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

My Toolbox - Greenshot

By

Foreword A picture is worth a thousand words. I use screenshots daily, whether it’s to...

Read the latest Blogs

Forums

backup and storage questions

By Bruin

I have a 1.3 terabyte database and growing, in which 1 table a month...

Help me design a correct simple table

By freiza

I have a table like Diesel(id, supplier, operator, machine, taken_time, given_time) There are 2...

Error Grafana SQLWATCH

By abdalah.mehdoini

hello , I am looking for a Grafana expert to help me with this...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers