Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT GROUP BY in VFP9
Message
From
25/02/2005 15:48:51
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00990675
Message ID:
00990704
Views:
25
Sergey --

The thought of MIN or MAX on non-numeric fields had never occurred to me. What do you get as a result -- the first(or last) value based on same criteria as used when ordering by that field?

Jim

>If you don't care about value of the second field, use MIN() or MAX().
select serv, MIN(desc1) AS desc1 ;
>  from dtparat ;
>  group by serv
>* or
>select serv, MAX(desc1) AS desc1 ;
>  from dtparat ;
>  group by serv
>
>
>>
>>I'm trying to clean up a GROUP BY query so that it will work with VFP9 (using ENGINEBEHAVIOR 90). I need to group by a single field (SERV), while including another as a descriptor (DESC1). The second field may have slightly different spelling across similar records and I don't really care which is included in the result.
>>
><snip>
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform