Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access queries
Message
 
 
À
08/11/2005 02:36:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01066285
Message ID:
01066430
Vues:
17
>but i guess you want this:
>
>SELECT Visits.Patient_Name
>, count(DISTINCT Visits.Doctor_Name) AS Number_Of_Doctors,
>, count(DISTINCT Doctors.Doctor_Specialty)  AS Number_Of_Specialities
>FROM Doctors
>inner join Visits on Doctors.Doctor_Name = Visits.Doctor_Name
>GROUP BY Visits.Patient_Name;
>
I think it would work. I don't have Access here at work, have to wait till I get home.

Here are two more problems:

Find which patients went to two or more doctors with the same specialty on the same day.

Find which patients went to two or more doctors with different specialties on the same day.

For these two queries we need to return the patient name, the date, the name of each doctor, and the doctor's specialty.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform