Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql example?
Message
 
 
À
10/08/2000 10:03:43
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00402536
Message ID:
00403417
Vues:
12
>>>Larry is not saying that you will get the wrong temperature for each city; he is saying that your query will tell you the wrong DATE for that temperature. Just looking at your query, I would think the date would be incorrect, unless
>
>You're right. I was home last night thinking about this problem, trying to figure out why it seemed like I got the right answer, but wasn't suppose to. Then it hit me, that I'm getting the right temp (after all, max(temp))
>but getting the wrong record back. Two very distinct things! And that just won't do!
>Nice catch, thanks for the help,
>
>Dustin

Dustin,
No problem.

I've been burned by how VFP handles aggregates and GROUP BY clauses a number of times. It should generate an error as SQL Server does when you include fields in the SELECT that are not also included in the GROUP BY. The query engine is too lax (IMO).

Cheers!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform