Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
burnseymufc
Starting Member
4 Posts |
Posted - 2008-10-03 : 06:39:20
|
I am trying to write a stored procedure that will delete from a top level downwards. Everything is in one table called Modules. I can add a Module to the table and a sub module to the table. A sub module can be linked to a module and a sub module can be linked to a sub module and so on. These are how they are linked:ID Name Parent9 Histopathology Null --Module, top level40 Cervical 9 --Sub Module41 Cancer 9 --Sub Module900 Liver 40 --Sub Module901 Virtual Slides 40 --Sub Module904 Cytopathology 41 --Sub Module1006 Neurology 41 --Sub ModuleEach sub module's is related to its parent by the 'parent' and 'id'.How can I go about deleting all of these using a stored procedure if I only have the id of the top module, to one with an id of 9? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|