Query Hierarchical data Using CTE in T-SQL 2005

In response to Sam Stange's "An old and new way to query Hierarchical data", this script uses the new CTE feature of SQL Server 2005 to display the hierarchical data all at once. I have added a check to prevent infinite loop in case there is a loop in the data (actually, there is one […]

3.67 (3)

2007-04-11 (first published: )

1,374 reads

Function Based Index in T-SQL

To build function based index in SQL Server, you can use indexed view (materialized view) or using a computed column. In this script, I give an exmaple of how to use the computed column to implement a function based index on a table to search through a free formated telephone number column. The basic step […]

5 (3)

2007-04-10 (first published: )

5,058 reads

Blogs

Goal Progress–Feb 2021

By

I set goals at the beginning of the year, and I’m tracking my progress...

How to: exec sp_help on temp tables?

By

Say you have a temp table and you want to see the columns names. For...

Daily Coping 26 Feb 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Why are DBAs not paid for knowledge and other IT Professionals are?

By Engineer

DBAs are being asked to know everything for 6 figures which cap out for...

Common Table Expression Misunderstandings

By Kathi Kellenberger

Comments posted to this topic are about the item Common Table Expression Misunderstandings

Distributed AG DB movement

By Syed_SQLDBA

I have a DAG between On prem and Azure. We have a maintenance window...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers