J
John Cosmas
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
(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