Help with SQL and SESSION datatable

Discussion in 'ASP .Net' started by John Cosmas, Jan 30, 2006.

  1. John Cosmas

    John Cosmas Guest

    I have a session object which stores the user specific list of records
    (CASES) that they are allowed to use, which comes from a global list
    (collection of CASES). I need to run a SELECT which JOINs the user
    records/cases with the CASE table so I can get the APPOINTMENTS, related
    specifically to the user cases. My SELECT statement should resemble
    something like this.

    SELECT CASES.CASEID, CASES.CASENAME, CASES.CASENUMBER, APPT.DATE, APPT.TIME,
    APPT.DESC FROM CASES JOIN APPT.CASEID = CASES.CASEID..... CASES.CASEID =
    USERCASES.CASEID

    In this case, the USERCASES come from a DIM pdatUserCases AS NEW DATATABLE =
    CTYPE(SESSION("MyUserCases"), DataTable). I've not done something unusual
    like this before, so I'm not so sure how I could join a DATATABLE into a
    SELECT statement. The only way I know how, is to stuff the USERCASES into a
    TEMP table.

    Also, I thought of passing the USERCASES into an ARRAY, and somehow using
    that in the SQL statement. If someone has an example, please share.

    TIA
    John
    John Cosmas, Jan 30, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Babe
    Replies:
    1
    Views:
    8,340
    Kevin Spencer
    Aug 15, 2003
  2. Fredrik Rodin

    Sort a datatable and create a new datatable

    Fredrik Rodin, Feb 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,045
    paul.mariotti
    Sep 28, 2007
  3. =?Utf-8?B?Qmx1ZWZsb3dlcg==?=

    Casting DataTable to class inherit from DataTable

    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    994
    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=
    Apr 2, 2004
  4. jg
    Replies:
    1
    Views:
    723
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=
    Aug 17, 2004
  5. Ersin Gençtürk
    Replies:
    1
    Views:
    3,479
    Ersin Gençtürk
    Oct 6, 2004
Loading...

Share This Page