Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access queries
Message
 
 
To
08/11/2005 12:46:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01066285
Message ID:
01066622
Views:
14
Fabio,

For some reason I can not make it to work. I'm now trying a simpler query
SELECT VISITS.patient_name, VISITS.visit_date, Doctors.doctor_Specialty
FROM Visits INNER JOIN Doctors ON Visits.Doctor_Name = Doctors.Doctor_Name
GROUP BY Patient_Name, Visit_Date, Doctor_Specialty
HAVING (count(DISTINCT Doctors.Doctor_Name) >1 AND count(DISTINCT Doctors.Doctor_Specialty)=1);
but I'm getting missing operator at the expression in Having clause.

Looks like it doesn't take the DISTINCT keyword. The above query works without DISTINCT, but returns 0 rows.
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