Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting the first one from a group
Message
From
29/02/2000 00:10:19
 
 
To
28/02/2000 23:53:17
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00338912
Message ID:
00338929
Views:
14
>Michel,
SELECT MIN(PrimaryKey),SecondaryKey FROM Table ;
>INTO CURSOR TEMP ;
>GROUP BY 2
Now, what if I need to extract the minimum value between the primary key and the secondary key. Because, on some results, it may be that the result includes a record which is having the secondary key higher than the primary key.

In coding, we would have MIN(1,2) which will return 1. However, in a SQL syntax, it returns an error betwen MIN(PrimaryKey,SecondaryKey).
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