我需要将此 SQL 语句转换为 HQL,但我认为 NOT EXISTS 在 HQL 中不起作用请帮助我!!!
SELECT doctor.idUser, schedule.idSchedule, schedule.timeStart, schedule.day
FROM doctor, schedule
WHERE schedule.day='LUNES'
AND schedule.timeStart > '08:00:00'
AND doctor.idUser= '1'
AND doctor.idUser = schedule.idUserDoctor
AND NOT EXISTS( SELECT * FROM appointment
WHERE schedule.idSchedule = appointment.idSchedule
AND doctor.idUser = schedule.idUserDoctor
AND appointment.appointmentDate ='2012-09-06')
AND NOT EXISTS ( SELECT * FROM temporaryschedule
WHERE schedule.idSchedule = temporaryschedule.idSchedule
AND doctor.idUser = schedule.idUserDoctor"
AND temporaryschedule.appointmentDate='201-09-06')
ORDER BY schedule.timeStart ASC