Technical Article

relatively simple mode, median, mean

Here's a sample script to help you get some generic mode, median, and mean statistics for something. In my example, I'm getting the number of days something takes to start and stop some task. The idea is that I'd have a fairly short list of jobs, and record would record the job id, and start/stop […]

You rated this post out of 5. Change rating

2006-08-17 (first published: )

1,097 reads

Technical Article

Change column collations back to database default

This script will create a single-line ALTER TABLE statement for each column in any table to change the collation to match the 'database default'. This is best accomplished in the Query Analyzer -- simply run the script, select all the records, and paste them into a new window to run them.

You rated this post out of 5. Change rating

2005-12-29 (first published: )

2,242 reads

Technical Article

Large auto-job-creation script for adding backups

This script creates a stored proc that was intended to run from a trigger on the master..sysdatabases for each database creation. Alas. It will create three jobs for each database you apply it to. First, it'll create a job to run a full backup each Sun, at 5am (see below). Those backups will be retained […]

You rated this post out of 5. Change rating

2004-12-16 (first published: )

381 reads

Blogs

The Book of Redgate: Get the right stuff done

By

Another of our values: The facing page has this quote: “We admire people who...

Runing tSQLt Tests with Claude

By

Running tSQLt unit tests is great from Visual Studio but my development workflow...

Getting Your Data GenAI-Ready: The Next Stage of Data Maturity

By

I remember a meeting where a client’s CEO leaned in and asked me, “So,...

Read the latest Blogs

Forums

Introduction of OPTIMIZE_FOR_SEQUENTIAL_KEY = ON

By saum70

Hi, We have low latency high volume system. I have a table having 3...

The Long Name

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Long Name

Eight Minutes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Eight Minutes

Visit the forum

Question of the Day

The Long Name

I run this code to create a table:Create table with unicode nameWhen I check the length, I get these results:Table with length of name shown as 132 charactersA table name is limited to 128 characters. How does this work?

See possible answers