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:
01063781
Views:
14
>I didn''t see the reason of JOIN and with second select. Try this:
>
>select Patient_name, Visit_date, MAX(other_field), COUNT(*) AS Cnt from Visits;
>       FROM VISITS
>       GROUP BY VISITS.patient_name, VISITS.visit_date
>       HAVING Cnt>1
>
That's wrong. We need information about each visit. This query would not give it. The other query works great, but I'm sure we can write another version of it either using EXISTS keyword or some JOIN commands. In fact I saw Sergey and Fabio writing these kinds of selects, but I don't remember right now.

BTW, my colleague said, that he got it now. E.g. looks like my slopish explanation was enough for him.
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