Common Table Expressions (CTE)

SQLServerCentral Article

CTEs and Trees

  • Article

Some new interresting points about trees and CTE in SQL Server : transforming a tree from auto reference to interval model (nested sets), calculating levels in interval model, creating a view of auto ref from an interval model, hierarchical numbering of items, and more. This article includes more examples based on his previous work.

4.11 (9)

You rated this post out of 5. Change rating

2007-12-26

5,595 reads

Blogs

Expanding Your DBA Horizons: Installing PostgreSQL in a Home Lab

By

Are you diversifying your DBA skillset? My recent job search made one thing clear:...

Back in the EU

By

I flew to Amsterdam last night and hopefully by the time this publishes I’ll...

The Feedback Multiplier: How Leaders Can Turn Input into Innovation

By

In every organization there is a hidden currency more valuable than capital, more enduring...

Read the latest Blogs

Forums

Unlocking High-Concurrency Inserts in SQL Server with OPTIMIZE_FOR_SEQUENTIAL_KEY

By Chandan Shukla

Comments posted to this topic are about the item Unlocking High-Concurrency Inserts in SQL...

Vector Datatype

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Vector Datatype

PRs Are Like Trouble Tickets

By Steve Jones - SSC Editor

Comments posted to this topic are about the item PRs Are Like Trouble Tickets

Visit the forum

Question of the Day

Vector Datatype

The new Vector datatype in SQL Server 2025 is a binary type that has a few parameters. What parameters are required?

See possible answers