Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL 7.0 vs 8.0
Message
 
 
À
15/04/2003 18:43:38
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00777961
Message ID:
00778284
Vues:
22
>Here is the code in question.
>
>
SELECT Appointments.app_time, Appointments.app_date,;
>   Appointments.pat_last;
>  FROM appointments;
>  where appointments.app_date >= mquerydate .AND.;
>  appointments.app_date <= mquerydate + 8;
>  GROUP BY Appointments.app_time, Appointments.app_date;
>  ORDER BY Appointments.app_time, Appointments.app_date;
>  INTO CURSOR existingappoints nofilter
>
>And sice this code does not contain aggregate functions the GROUP BY clause should include Appointments.pat_last?

Yes. Aggregated fields are the only ones that do not need to be in the GROUP BY. All else do.

>What if there were 10 fields in teh select statement, has a Group By clause, and no aggregate functions. Should all the 10 fields be identified in the Group By clause, and in the order of how they should be grouped?

Yes. Same as above.

>Thank you for your time Mark. It is appreciated.

You are welcome.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform