Re: What Method do you use to pull data of an orcurrence when 2people see the same person during a certain period

From: <pberetta_at_my-deja.com>
Date: Sat, 11 Dec 1999 00:02:25 GMT
Message-ID: <82s4ah$nb3$1_at_nnrp1.deja.com>


Jas,
  Did you try the solution I proposed when you first posted this question? You are absolutely right WHERE doctor = 'A' AND doctor = 'B' would never work, on the other hand WHERE ( doctor = 'A' OR doctor = 'B' ) should return all the visits to doctor A AND all the visits to doctor B. The 2 '0 < ' subqueries assure that you will only list patients who have visited both doctors in the period chosen. Like I said before, the solution is not elegant, there may very well be an easier (faster) way to do this - but it definitely should work. Unless your table is much larger than I am envisioning, the performace hit should be tolerable.
Regards,
Paul

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Dec 11 1999 - 01:02:25 CET

Original text of this message