tags:

views:

51

answers:

1
+4  A: 

Unclear if you want to

  1. exclude Nurses that work with Doctor 2 on other wards, or
  2. exclude nurses only if they work with Doctor 2 on Ward 2,

If the former:

   Select Nurse From Table T
   Where Ward = 'W2'
      And Doctor = 'DR1'
      And Not Exists (Select * From Table
                      Where Nurse = T.Nurse
                          And Doctor = 'DR2')

if the latter,

   Select Nurse From Table T
   Where Ward = 'W2'
      And Doctor = 'DR1'
      And Not Exists (Select * From Table
                      Where Nurse = T.Nurse
                          And Ward = 'W2'
                          And Doctor = 'DR2')
Charles Bretana
Many thanks that is brill
Ben