Hi Mark,
>
>Do you really want a GROUP BY here? You don't have any aggregate fields (SUM(), MAX(), etc)
>
>For 'standard' SQL you have to include all non-aggregate SELECTed fields in the GROUP BY Clause,
>
Well, it works ok [and gives me the result I want] in both SQL Server and VFP now if I use:
Select training.idtraining, training.course, training.subject, training.held from training group by training.course
However, this doesn't work in Oracle.
>Maybe you just need a SELECT Distinct?
>
>i.e.
>Select DISTINCT training.idtraining, training.course, training.subject, training.held from training
No. Because idtraining is unique for every record in the training table, your query results in all records being returned. I want one record for each unique value of training.course. ;-(
I'm going to post a message in the Oracle forum to see if anyone there has any ideas.
Best.
Matt.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement