Technical Article

Function to Split a Delimited String into a Table

This function splits a delimited string (up to 4000 characters long) into a single column table. The delimiter can be specified at the time of execution. If not specified, the delimiter defaults to a comma. The default length of each value is 100, but that can easily be changed.An example for usage:DECLARE @string NVARCHAR(4000)DECLARE @instruments […]

3.17 (6)

You rated this post out of 5. Change rating

2007-05-25 (first published: )

5,603 reads

Technical Article

Drop a Column and its Constraints and Indexes

Drops the specified column from the specified table as well as any constraints and indexes that depend on the column. By default the script will just find the corresponding column, constraints, and indexes.Comes in handy for patching databases.

3.5 (2)

You rated this post out of 5. Change rating

2007-01-24 (first published: )

2,432 reads

Technical Article

Backup any/all Databases (Native AND LiteSpeed friendly)

This script can run backups for any/all databases using both SQL native and Quest's SQL LiteSpeed product. It includes options for Complete (Full), Differential, and Transaction Log backups (File and File Group backups will be coming soon). It will also clean up old backups and the msdb tables accordingly.See script for a full parameter list.NOTE: […]

5 (3)

You rated this post out of 5. Change rating

2006-10-25 (first published: )

5,166 reads

Technical Article

Function to return the SQL Build Number

This function returns the SQL Build Number as a nvarchar(20) string. i.e. '8.00.760' @@Version is great, but super long, and the formatting of the string has changed over the years. This helps me find out what build of SQL I'm working on in a quick and efficient manner. The script includes the drop statement as […]

5 (1)

You rated this post out of 5. Change rating

2006-08-09 (first published: )

992 reads

Technical Article

Function to return the SQL Version Number

This function returns the SQL Build Number as an int. i.e. 7, 8, or 9. @@Version is great, but super long, and the formatting of the string has changed over the years. This helps me find out what version of SQL I'm working on in a quick and efficient manner. The script includes the drop […]

You rated this post out of 5. Change rating

2006-08-08 (first published: )

1,225 reads

Technical Article

Stored Procedure to get Job History (with Steps)

This procedure returns the job history for any jobs run on a given day. The parameter should be entered in mm/dd/yyyy format surrounded by single quotes. I use it to produce a report of any jobs that failed on any given day.It should be created on the MSDB database.Example: EXEC usp_job_history '10/02/2004' This is my […]

You rated this post out of 5. Change rating

2004-10-04

2,142 reads

Blogs

First Time Speaking with a Mask at an Event

By

Over the past couple of months, I have started losing my ability to talk...

A New Word: Apolytus

By

apolytus– n. the moment you realize you are changing as a person, finally outgrowing...

Tired of Tedious SQL Queries? AI Tools Can Automate The Boring Parts

By

If you've ever wrestled with complex SQL code, you know the drill. Hours spent...

Read the latest Blogs

Forums

Do you listen to music when you work?

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Do you listen to music...

Slow update on temp table

By dpaproskijr

I have a job running each night starting at 4:30AM and usually finishing at...

Table Partitioning - remove null range

By goher2000

hi guys,   I have a partitioned table AM_ITM_INSTNC_MSS and I want to  get...

Visit the forum

Question of the Day

Read Only Replica in SQL Server Standard

Our environment runs using SQL Server Standard. We are implementing Availability groups. Our database has been experiencing high read volumes, so I want to let the application read the Synchronized Secondary replica, as I read that HADR does this. Can we implement this?

See possible answers