Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting the first one from a group
Message
De
29/02/2000 00:10:19
 
 
À
28/02/2000 23:53:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00338912
Message ID:
00338929
Vues:
13
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform