Miscellaneous

Technical Article

Script to Find Locations of Specified Column

  • Script

Use this script to find tables, views, stored procedures that directly reference a column in the SELECT statement or in a join. This script will also return stored procedure and view names that have SELECT * in them when the specified column exists in the table referenced by that SELECT statement.

4 (1)

You rated this post out of 5. Change rating

2002-03-15

1,048 reads

Technical Article

Find Missing Constraints

  • Script

Procedure to help find missing constraints when comparing two databases that are supposed to be the same.  SP has ability to show all constraints per database, and the ability to generate create scripts to make adding the missing constraints easier.

You rated this post out of 5. Change rating

2006-12-26 (first published: )

763 reads

Technical Article

Pivot Data based on Unknown Field Items

  • Script

I was posed a question a few months back on another site about being about to create a Pivot Table (Horizontal version of vertical data) and I saw the question again today. This will allow you to do that, just make changes to the query where the title is the replacement need. It will build […]

1 (1)

You rated this post out of 5. Change rating

2002-03-07

1,317 reads

Blogs

How to find free space in Azure PosgreSQL

By

I wanted to figure out how big (or approximately how big) my dump file...

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Read the latest Blogs

Forums

Announcing SQL Server 2025

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Announcing SQL Server 2025

Running Steve's Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Running Steve's Code

New SQL Server 2022 Functions

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New SQL Server 2022 Functions

Visit the forum

Question of the Day

Running Steve's Code

Can you run this code in any of your SQL Server 2019 databases without error?

CREATE OR ALTER PROCEDURE [dbo].[StevesAmazingProc]
AS
    
        SELECT Consumer_ID ,
               Trend_Category ,
               Bit_Trace
        FROM    NewWorldDB.dbo.MarketTrend;
    
GO

See possible answers