Home Forums SQL Server 2008 T-SQL (SS2K8) Need Help on User Tree Hierarchy with Addition/Deletion Option RE: Need Help on User Tree Hierarchy with Addition/Deletion Option

  • roh_ranjan (9/26/2012)


    Hello Sean

    What i mean to say that user have maximum right to perform addition/deletion/substitution.Assuming I/you have all access and now request came to add/delete/substitute user in current hierarchy showing.

    a) Deletion/substitution process

    Deleting a single node in the middle of the tree then fill up the existing user into the vacancies as created.

    I don't know what you mean. Deleting a row is just a delete statement. What do you mean by filling up the vacancy? Are you saying if a node is removed that the child of that row moves up a level?

    b) Addition/updating Process

    Add the user in middle/anywhere of node of the tree.Updates to the nodes are performed by searching for the key of each node.if user exist then do not insert else insert the user.We have to consider the level when we are adding /updating user(using userid).

    An insert statement? I don't get what you mean at by consider the level when adding.

    Let me know if you need any more information

    Thanks again for your help

    R

    I know you are pretty new around here but your question is just entirely to vague. You have an idea of what you want to do but I don't have a clue. I think you read back through your posts from the perspective of somebody outside your company you would see that you don't have anywhere near enough information about what you are trying to do. I really am willing to help but you have to provide enough information. Take a look at this link. http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/