>If you want just these patients with 2 visits change
>having count(VISITS.visit_date)> 1 to
>having count(VISITS.visit_date)= 2
>
>else you'll get all that have 3,4 or more visits.
I meant more than 1. 2 or more is fine. That's a minor point anyway <g>
If it's not broken, fix it until it is.
My Blog