T-SQL

Optimize Character Field Usage

  • Script

This stored procedure was designed to scan all your character based columns in a particular database and show the minimum, maximum and average data length. As well as give an efficiency rating of the data stored. Input: None Output: Table name, Column name, Defined datatype and length, Average length of data for that column, Minimum […]

2001-08-10

1,653 reads

Generate Insert Statements Easily

  • Script

This script will generate insert statements for the given tables. You can pass the tables names, separated by commas, into sp_DataAsInsCommand stored procedure as in the example below: EXEC sp_DataAsInsCommand 'employee,titleauthor,pub_info' Updated on 5/25/01 to correct an issue with columns that are short like a column defined as char(1), to correct another issue with the […]

3 (9)

2001-08-09

4,573 reads

ANSI Joins

  • Article

Are you confused by all this inner join style syntax that is becoming more and more prominent lately? This article by Neil Boyle will help you find your footing in the ANSI join syntax.

5 (3)

2001-05-29

7,916 reads

Blogs

Use Jupyter Notebooks to Help People on StackOverFlow

By

I am sat in the PowerShell Saturday in Hamburg. You can see me on...

ACM Lecture at SELU

By

Had the pleasure of presenting to Dr. Ghassan Alkadi and a full house at...

T-SQL Copy & Paste Pattern – Increasing a performance problem

By

Disclaimer: The title is my assumption because I saw it in the past happening...

Read the latest Blogs

Forums

Distributing a value among the rows in Sql Server

By bsushu

Dear All, I have a requirement in which i need to distribute a value...

Needed to find all possible Dates Overlaps from a single Table

By Hell-1934

Hi, I have the following Episode table example: Where DischDate = "2020-02-20" means - client hasn't...

Optimize Cursor

By GrassHopper

I inherited this script that has a cursor and I know this query can...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Fashion

See possible answers