janieS
02-29-2008, 11:07 PM
Hi
The following SQL gets all times from a table called apptTimes (there are 12 rows), and prints them out with rows from other tables (appts, client, patient) that are matching by apptTimes.timeID=appts.timeAppt.
SELECT
apptTimes.apptTime, appts.clientIDAppt, appts.patientIDAppt, client.surname, patient.patient_name
FROM
apptTimes
LEFT JOIN
[SELECT * FROM appts, client, patient
WHERE
apptTime.timeID = appts.timeAppt
AND appts.clientIDAppt=client.client_ID
AND patient.patient_id = appts.patientIDAppt
AND appts.roomNo = 1].
AS appts
ON apptTimes.timeID = appts.timeAppt;
This query works in Access, but I don't know how to code it for ASP/Access 2000 workability. In Access a parameter is asked for, timeID = timeAppt.
I will have a Session to include from ASP of a date value, therefore how do I display all the times from one table, and matching rows from other table s where the date is a session variable.
Can anybody help, I've been at this a couple of weeks now?
Thanks
The following SQL gets all times from a table called apptTimes (there are 12 rows), and prints them out with rows from other tables (appts, client, patient) that are matching by apptTimes.timeID=appts.timeAppt.
SELECT
apptTimes.apptTime, appts.clientIDAppt, appts.patientIDAppt, client.surname, patient.patient_name
FROM
apptTimes
LEFT JOIN
[SELECT * FROM appts, client, patient
WHERE
apptTime.timeID = appts.timeAppt
AND appts.clientIDAppt=client.client_ID
AND patient.patient_id = appts.patientIDAppt
AND appts.roomNo = 1].
AS appts
ON apptTimes.timeID = appts.timeAppt;
This query works in Access, but I don't know how to code it for ASP/Access 2000 workability. In Access a parameter is asked for, timeID = timeAppt.
I will have a Session to include from ASP of a date value, therefore how do I display all the times from one table, and matching rows from other table s where the date is a session variable.
Can anybody help, I've been at this a couple of weeks now?
Thanks