Recursive Joins or Parent/Child Trees

By Bill Graziano on 15 September 2000 | 0 Comments | Tags: JOINs


Patrick was the most recent person to ask about using SQL Server to return the rows based on a parent child relationship (like a message board). Our own sqlguru wrote two articles on this not too long ago.

These articles are were originally posted on 4GuysFromRolla.com. The first article (Performing Recursive Joins) covers the basics. Performing Complete Recursive Joins is the follow up article with more depth.

If you are planning a message board and wanting to maximize your use of SQL Server these articles will tell you what you can and can't do.

Discuss this article: 0 Comments so far. Print this Article. This page has been read 42,001 times.

If you like this article you can sign up for our newsletter. We send it out each week that we post a new article. There's an opt-out link at the bottom of each newsletter so it's easy to unsubscribe at any time.

Email Address:

Email ThisSubscribe to this feedKick itSave to del.icio.usView blog reactions

Related Articles

Additional Criteria in the JOIN Clause (16 September 2002)

Other Recent Forum Posts

sql query: finding average of.. after count (10 Replies)

Clustered Index question (1 Reply)

import Excel file to mssql (0 Replies)

index suggestions (0 Replies)

sql query: producing report (1 Reply)

How can i get ID that i inserted a record ? (0 Replies)

Database Mirroring (1 Reply)

Can't get SQL to install (17 Replies)

Subscribe to SQLTeam.com

Weekly SQL Server newsletter with articles, forum posts, and blog posts via email:

SQLTeam.com Articles via RSS

SQLTeam.com Weblog via RSS

- Advertisement -

- Sponsor's Message -

SQLShare.com Videos

Using DatePart and DateName

Ever want to get the month out of a date as a number, or as literal text? Many people will do it by parsing the date as a string, but we've got some built in functions that will do it cleanly and consistently.

Renaming a Database

You won't do it often, but it's nice to know how, and you're not still using sp_renamedb are you? Join us for a quick look at how to use the alter syntax to change the db name along with a tip on how to quickly disconnect any remaining users from the database.

File Share Subscriptions in Reporting Services

Whether you want to generate PDF invoices for customers or do a daily export that will get processed by one of your vendors, the ability to deliver reports to a file share is a useful and simple feature baked in to Reporting Services. In this lesson Devin will show you how to do it and how to set most of the common options.

File Share Subscriptions in Reporting Services

Whether you want to generate PDF invoices for customers or do a daily export that will get processed by one of your vendors, the ability to deliver reports to a file share is a useful and simple feature baked in to Reporting Services. In this lesson Devin will show you how to do it and how to set most of the common options.

Using DB_ID and DB_Name Functions

Simple but effective, DB_ID and DB_Name give you a concise way to look up the id of a database from a name, or look up the name of a database from an id. There are times when you'll need to write the join to sys.sysdatabases, but when all you need is a quick conversion, these functions get it done.