Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql example?
Message
 
 
To
10/08/2000 10:03:43
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00402536
Message ID:
00403417
Views:
11
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform