hi there i ve got a problem that shouldnt be difficult to solve but since i m quite new to this i got it totally wrong...
Basicaly i manage to use the except with date condition but when i added another AND condition it give me a whole list of answer which it shouldnt
This is my sql structure
SELECT Patient.HNID, Patient.HN, Patient.Names, Patient.Surname FROM Patient
EXCEPT Select Patient.HNID,Patient.HN,Patient.Names, Patient.Surname
FROM INNER Patient JOIN Appointment ON Patient.HNID = Appointment.HNID
WHERE Appointment.AppointmentDate Between '20060704' AND '20061004' AND Patient.Gender = 1
Note: without having AND Patient.Gender =1 the query work fine
please help
much appreciate
sun
Basicaly i manage to use the except with date condition but when i added another AND condition it give me a whole list of answer which it shouldnt
This is my sql structure
SELECT Patient.HNID, Patient.HN, Patient.Names, Patient.Surname FROM Patient
EXCEPT Select Patient.HNID,Patient.HN,Patient.Names, Patient.Surname
FROM INNER Patient JOIN Appointment ON Patient.HNID = Appointment.HNID
WHERE Appointment.AppointmentDate Between '20060704' AND '20061004' AND Patient.Gender = 1
Note: without having AND Patient.Gender =1 the query work fine
please help
much appreciate
sun