>SELECT pat_handle, last_name, first_name, gender,; > scantype, site, label, side, facility_i,; > Birth_time, Physician, Comments, Acq_time,; > BMD, Fracture_r, Percent_ya,; > Percent_am, Zsco_bmd_y, Zsco_bmd_a; > FROM working; > WHERE BMD IN ; > (SELECT MIN(BMD) FROM working; > WHERE scantype=19 AND (LABEL=4 OR LABEL=0) ) >>
Recno Scantype BMD 1 18 2 2 18 3 3 18 4 4 19 4 5 19 5 6 19 6Records 3 and 4 would get selected
SELECT pat_handle, last_name, first_name, gender,; scantype, site, label, side, facility_i,; Birth_time, Physician, Comments, Acq_time,; BMD, Fracture_r, Percent_ya,; Percent_am, Zsco_bmd_y, Zsco_bmd_a; FROM working; <B>WHERE scantype=19 AND (LABEL=4 OR LABEL=0) AND</B> BMD IN ; (SELECT MIN(BMD) FROM working; WHERE scantype=19 AND (LABEL=4 OR LABEL=0) )Have I missed something..........Rich