tovvenki
asked on
Delete Nodes in an Hierarchy
Hi,
I have a table with the following columns
id int
name varchar
parent id
this table is used to create a tree structure of any level deep. Now I want to create a procedure/function that gets the node id as a parameter and deletes all its children till the end. Under the passed node id there can be any level of nodes...sub nodes ...etc.
can anyone please point me to an article or procedure/function that does this.
Thanks in advance
Venki
I have a table with the following columns
id int
name varchar
parent id
this table is used to create a tree structure of any level deep. Now I want to create a procedure/function that gets the node id as a parameter and deletes all its children till the end. Under the passed node id there can be any level of nodes...sub nodes ...etc.
can anyone please point me to an article or procedure/function that does this.
Thanks in advance
Venki
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>session no column, how it gets its value,
Session No is to track the sessions for example you have 3 users working on search so each user should have one session no. Now this session no could be user_name. and it shuold be passed by the application .
Session No is to track the sessions for example you have 3 users working on search so each user should have one session no. Now this session no could be user_name. and it shuold be passed by the application .
ASKER
Thnaks for the prompt reply, but can you give some additional information on the the session no column, how it gets its value, whether the application send this id or...??
Thanks
venki