Technical Article

Find Table Usage

Creates a printable report of all stored procedures, views, triggers and user-defined functions that reference any of the tables passed into the procedure.Wrote this to easily list items affected by table changes when working in a fast-paced development environment developing a shrink wrapped product undergoing many schema changes.Split function is listed after sp definintion

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(6)

You rated this post out of 5. Change rating

2007-10-23 (first published: )

3,341 reads

Technical Article

Find Column Name Usage

This procedure produces a formatted report to list which tables, views and table functions have a column of the specified name. This is particularly useful in systems that do not enforce referential integrity or when schema changes are being evaluated.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(6)

You rated this post out of 5. Change rating

2007-10-22 (first published: )

4,189 reads

Technical Article

Find Column Usage

When changing schema or modifying an application it is often necessary to determine when a column from a specific table is used.  This procedure produces a formatted report (when outputting from query analyzer or management studio in text mode) that specifies all of the procedures, views, functions and triggers that use the designated table.column.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(13)

You rated this post out of 5. Change rating

2007-10-10 (first published: )

7,448 reads

Technical Article

Determine Distance Between Any Two Locations

This function allows you to calculate the distance in miles or kilometers between any two points on the earth. I created to calculate the distance between two zip codes but is can be used for any two coordinates for which latitude and longitude is known.NOTE: A database for the coordinates of any US postal code […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(4)

You rated this post out of 5. Change rating

2006-04-25 (first published: )

1,302 reads

Technical Article

Calculate upcoming business day from date (Updated)

Calculates the next business day based upon the work weeklength, number of days from the start date and a list of holiday dates kept in a table called HolidayDate.Created this script for determining the next banking day from 2 days after a request for wiring funds. Can be used for things like calculating shipping dates […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2006-01-19 (first published: )

1,553 reads

Technical Article

Pad String

Pads a string on either with either leading or trailing characters. You specify the direction, the tolal string length and the character to pad with.Error conditions return null

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2005-08-19 (first published: )

2,091 reads

Technical Article

Join Column Values

This script will join a single selected column from a select statement into a varchar variable. This works similarly to the javascript join function with a few additional features. By default the values will be joined with commas unless an alternate delimiter is supplied. The user can specify if the delimited values should quoted. To […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2003-10-30

553 reads

Technical Article

Identify Primary Key Violation Prior to Insert (Updated)

This script allows for testing if rows will cause a primary key violations prior to inserting the data.  Offending rows are stored in a table so they can be used in subsequent queries or used to debug bad data issues. This updated version adds a timestamp to the duplicates table so that identifying when the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2003-10-28

1,862 reads

Blogs

Flyway Tips: Object History

By

It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...

Car Update September 2026

By

Software is hard. While I love our Lucid Gravity, I realize that they are...

Microsoft Tools for Making Data AI-Ready

By

Making Data AI-Ready, Part 2 (This is the second article in a three-part series...

Read the latest Blogs

Forums

Looking for old SQL Server 1.x - 4.21 disks, manuals, boxes, etc.

By Mike Scalise

Hi everyone, I'm hoping some of the longtime SQL Server professionals here might be...

Checking the Error Log II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Checking the Error Log II

Parameter Sniffing on SQL Server 2025: A Walkthrough with Real Numbers

By deepeshdhake

Comments posted to this topic are about the item Parameter Sniffing on SQL Server...

Visit the forum

Question of the Day

Checking the Error Log II

What is the reason I should change my old code that uses xp_readerrorlog?

See possible answers