I have a database of patient who received different operations. I would like to have a list of patients who have received operation ‘x’ with also, just for those patients’ a list of all the other operations they have had.
I have a database of patient who received different operations. I would like to have a list of patients who have received operation ‘x’ with also, just for those patients’ a list of all the other operations they have had.
SELECT * FROM table WHERE PatientID IN (SELECT PatientID FROM table WHERE Operation = "x");
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
do i type this in the criteria box of the field in the design view of the query?
Do you mean the IN operator and nested SQL, yes it goes in criteria.
Can try typing in SQL view and then switch to Design view.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.