T-SQL

Technical Article

Divide big delete into several small ones

  • Script

Big transactions cause the Tlog to grow.When you do a clean of a large table, the delete statement can cause a very long transactionSometimes it's necessary to prevent this.So we divide one big delete into several little ones.A table with call centre data gets +/- 1-mlj records a day. Every day we run a script […]

You rated this post out of 5. Change rating

2002-08-27

821 reads

Technical Article

Function to Return the Amount of Children in a Tree

  • Script

Assuming we have the following table (that stores hierarchical data)  :CREATE TABLE [staff] (    [employee] [int] NOT NULL ,    [employee_name] [varchar] (10) NULL ,    [supervisor] [int] NULL ,     PRIMARY KEY  CLUSTERED     (        [employee]    )  ON [PRIMARY] ,     FOREIGN KEY     (        [supervisor]    ) REFERENCES [staff] (        [employee]    ))I ‘ll built a […]

You rated this post out of 5. Change rating

2002-08-23

832 reads

Technical Article

Working with email addresses in SQL Server!

  • Article

This article shows you how to design the storage for email addresses, how to validate email addresses, how to retrieve demographic information from email addresses efficiently, using computed columns and indexes. It also covers the security aspect of dealing with email addresses.

2002-08-01

1,340 reads

Blogs

The trade-offs associated with low-code solutions

By

Low-code solutions often accelerate development and make tasks accessible to people who can’t or...

Monday Monitor Tips: Looking Back in Time

By

Often we find out about a problem reported by a customer after the incident...

Can You Tell Why a Plan Didn’t Go Parallel?

By

Let’s face it, most of the time, you probably don’t want your SQL Server...

Read the latest Blogs

Forums

SSIS how to manage source control with multiple packages / projects

By sgraflund

We've got upwards of 40 SSIS solutions all stored in one GIT repository in...

Improving the Performance of UPDATE Statements in SQL Server

By Noman072

Comments posted to this topic are about the item Improving the Performance of UPDATE...

Replacing a Null

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Replacing a Null

Visit the forum

Question of the Day

Replacing a Null

What is returned from this code in SQL Server 2022?

DECLARE @value INT = NULL;
SELECT ISNULL(@value, 100.5) AS Result;

See possible answers