Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by clause in vfp8
Message
From
18/04/2003 16:52:32
 
 
To
18/04/2003 16:28:06
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00774269
Message ID:
00779360
Views:
42
>Hi Steve.
>
>You're forgiven.

Thanks :)

>
>As to the query, you're correct. Adding extra1 to the group results in 4 records. Leaving it out of the group by will give one record, but how does the computer know what is the "correct" result for the field extra1?
>

Correct, as you're aware, it requires more work, something like:
SELECT field1, MAX(another1) as another1 ;
  from  badgroup ;
  GROUP BY field1 ;
  INTO CURSOR  c_test

SELECT * from badgroup ;
	where field1 = c_test.field1 ;
		and another1 = c_test.another1
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform