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,586 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

Impact of adding the opening of the Master Key in a SQL job for SSIS packages

By abdalah.mehdoini

Bonjour à tous, J'ai un problème d'exécution de mes packages SSIS. A chaque opération...

Being an extroverted introvert at a conference

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Being an extroverted introvert at...

Need to group the same valued ID fields to run an aggregate average over them

By Zososql

I have data that contains poll results, with the poll_id consistuting a single row...

Visit the forum

Question of the Day

How are statistics stored?

How are the statistics for query optimization stored in SQL Server?

See possible answers