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

PowerShell (and T-SQL) and Elastic Jobs

By

I’ve covered how to create Elastic Jobs in the portal (this one is important...

A New Word: Redesis

By

redesis – n. a feeling of queasiness while offering someone advice, knowing they might...

Friday Flyway Tips: Autopilot in 10 minutes

By

The Solutions Engineers at Redgate recently released an Introduction to Redgate Flyway Autopilot course...

Read the latest Blogs

Forums

how to find the 2nd and 2nd to last entry in a table?

By water490

Hi everyone I am working on a query where the calculation depends on whether...

How to Obtain Call History of a Stored Procedure/UDF

By YSLGuru

I know in the past this wasn't possible but maybe that's changed as SQL...

No End to Programmers

By Steve Jones - SSC Editor

Comments posted to this topic are about the item No End to Programmers

Visit the forum

Question of the Day

Counting Bits II

What is the result of this query in SQL Server 2022+?

select bit_count('7')

See possible answers