• walidkilani (8/29/2012)


    1. Query the USESSION table for the users 'session_id':

    select session_id from USESSION where delete_session_id is NULL and user_id = (select user_id from users where user_name = '<Enter User Name>');

    2. Delete the users records in the table UPKLIST:

    Delete from UPKLIST where session_id = <session_id>;

    3. Delete the users records in the table PROJSHAR:

    Delete from PROJSHAR where session_id = <session_id>;

    4. Delete the users records in the table USESSION

    Delete from USESSION where session_id = <session_id>;

    After waiting for an answer for three years and nine days, Hamzah went home yesterday. You just missed him.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden