creating a table for user use

  • working with web based application i have a main table with 1000s of records

    user A logs in & selects few records from main table

    suppose user B also logs in & select another set of records which may or may not contain the records from user A

    my query is in a multiuser enviorment when working with data from multiple users creating a temp table or a session table when in user A or B can store their own set of data & work wth

    wht wuld be the best approch this case.

    i tried creating a #temptable but the problem is i am not able to use it with reporting services

  • This was removed by the editor as SPAM

  • ok

    suppose after creating a physical table

    2 users from different systems log in with same id & choose different rows of data to work with how can it be handled

  • This was removed by the editor as SPAM

  • Stewart "Arturius" Campbell (5/16/2012)


    Consider using the sys.sysprocesses catalogue view

    Regarding the use of sys.sysprocesses, please do not recommend or use it for new development unless absolutely necessary. The replacement views are sys.dm_exec_connections, sys.dm_exec_sessions and sys.dm_exec_requests. sys/sysprocesses is provided for compatibility with older code and will be removed in a future version. Here is the only case I know of when it is justified to use the sys.sysprocesses compatibility view for new work, but it is not relevant here: Geek City: Why I still need Sysprocesses by Kalen Delaney

    To replace the query you provided I would recommend:

    SELECT *

    FROM sys.dm_exec_sessions

    WHERE session_id = @@SPID;

    sys.sysprocesses.spid maps to sys.dm_exec_sessions.session_id and sid maps to security_id. sid is not a unique column in the view. It relates a connection to a login so if one person is logged into the instance multiple times they'll be multiple rows in sys.dm_exec_sessions with the same security_id.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • ssurekha2000 (5/15/2012)


    working with web based application i have a main table with 1000s of records

    user A logs in & selects few records from main table

    suppose user B also logs in & select another set of records which may or may not contain the records from user A

    my query is in a multiuser enviorment when working with data from multiple users creating a temp table or a session table when in user A or B can store their own set of data & work wth

    wht wuld be the best approch this case.

    i tried creating a #temptable but the problem is i am not able to use it with reporting services

    When you say "work with", what do you mean? Will both users be manipulating the data for display in a report? Or does "work with" mean they will both potentially be modifying the same set of data?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply