Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very embarassing - Access query
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01063741
Message ID:
01063760
Views:
7
>>
>>Right. I know it's in VBA help but I didn't dig that far. Meanwhile my colleague confirmed, that the query worked great. Now he needs some explanation why it works.
>>
>>That's what I sent him, may be you can phrase it better:
>>
>>We need to select patient + date where patient + date are in the result. E.g. we are doing two selects. The inner select filters the data using group by and having and the outer select brings the rest of the data.
>
>
>Is that whole Select?
>
>select * from Visits;
>       INNER JOIN DOCTORS ON VISITS.doctor_name = DOCTORS.doctor_name;
>where patient_name + CStr(date) in;
>  (SELECT VISITS.patient_name+CStr(VISITS.visit_date)
>          FROM VISITS GROUP BY VISITS.patient_name, VISITS.visit_date
>          HAVING count(VISITS.visit_date)>1)
>
Yes, that's the select I sent him. Is there another way to make it with EXISTS keyword (I never was able to use it correctly). I need to explain now why it works. He is learning SQL and that was one of the exercises.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform