Friday, March 9, 2012

How to delete the whole sub tree?

Please see also the problem at:
http://blog.joycode.com/mvm/articles/63479.aspx"Roger" <Roger@.discussions.microsoft.com> wrote in message
news:95C239A5-96E2-41F3-A680-EADEB362E06B@.microsoft.com...
> Please see also the problem at:
> http://blog.joycode.com/mvm/articles/63479.aspx
You can find a great deal of discussion about SQL hierarchies and subtree
maintenance online. In SQL 2000 your options are either to choose a
different hierarchy model that allows set-based subtree maintenance or to
delete the nodes recursively (using a loop or recursive triggers for
example). In SQL Server 2005 we have recursive CTEs to accomplish the same.
Here are some references:
http://www.intelligententerprise.co.../celko1_1.jhtml
http://www.dbazine.com/tropashko4.html
http://www.windowsitpro.com/SQLServ.../8826/8826.html
http://msdn.microsoft.com/library/d...r />
_5yk3.asp
http://www.amazon.com/exec/obidos/t...0220136-2726321
http://www.solidqualitylearning.com...0-%20Slides.zip
http://www.solidqualitylearning.com...-%20Scripts.zip
http://www.sqlteam.com/item.asp?ItemID=8866
http://vyaskn.tripod.com/hierarchie...r_databases.htm
http://www.yafla.com/papers/sqlhier...hierarchies.htm
David Portas
SQL Server MVP
--|||Get a copy of TREES & HIERARCHIES IN SQL for several better ways to
model this.

No comments:

Post a Comment