ไม่รู้ว่าผิดตรงไหนเหมือนกันครับ
รบกวนช่วยดูด้วยครับ
SELECT pq_doctor.doctor_date, vn_stat.hn, patient.pname, patient.fname, patient.lname, doctor.name, doctor.code, pq_doctor.doctor_time
FROM (((pq_doctor LEFT JOIN vn_stat ON pq_doctor.vn = vn_stat.vn) LEFT JOIN doctor ON pq_doctor.doctor = doctor.code) LEFT JOIN patient ON vn_stat.hn = patient.hn) LEFT JOIN ovstdiag ON vn_stat.vn = ovstdiag.vn
GROUP BY pq_doctor.doctor_date, vn_stat.hn, patient.pname, patient.fname, patient.lname, doctor.name, doctor.code, pq_doctor.doctor_time
HAVING (((pq_doctor.doctor_date) Between "2007-12-01" And "2007-12-20") AND ((doctor.code)="02") AND ((pq_doctor.doctor_time) Between "07:30:00" And "08:30:00"))
ORDER BY pq_doctor.doctor_date
ขอบคุณล่วงหน้าครับผม