Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting the first one from a group
Message
From
29/02/2000 01:11:56
 
 
To
29/02/2000 00:49:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00338912
Message ID:
00338954
Views:
17
>If so, this combination should do it (note slight change in first SQL)
SELECT MIN(PrimaryKey) AS pk, SecondaryKey AS sk ;
>FROM Table INTO CURSOR TEMP ;
>GROUP BY 2
>* now choose smaller of two for first column
>SELECT EVAL("MIN(pk,sk)") AS pk, sk FROM temp
Thanks to all who helped me on this.

I chose this approach. I guess all approaches sent are good as well. And, the speed is good as well.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform