Alternative to subselect in MySQL?

liunx

Guest
I have a table called technician and a table called appointment. technician has a primary key called techID. appointment also contains the techID field, to tie a particular technician to a particular appointment.

What I'm trying to do is to select the technicians who are not tied to an appointment for a particular date and time. I think I know how I could do this if I could use a subselect, but I'm using MySQL version 3.23, which doesn't support them as far as I know. If it were possible to do one, I think (could be wrong, though) that I could use something like: select techID from technician where techID not in (select techID from appointment where apptDate=$date and apptTime=$time)

I can't figure out another way to do this without using a subselect like that. Any help would be greatly appreciated. If you need any more information, let me know.you can do 2 selects. select one query for the appointment and then with the outcome of that one do another query for teh technician.

other than that I think tha tis your only hope. I don't think you can do a join on that
 
Top