Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oops! MIN & MAX in SQL commands
Message
De
13/02/2003 06:17:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/02/2003 17:01:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00752219
Message ID:
00752621
Vues:
15
>Sorry... won't work...
>
>Your select statement will choose the last record that has a higher value than 99.
>
>
>SELECT IIF(nfield>99, nfield, 99) FROM ....
>
>SELECT MAX(nField) FROM ... WHERE nField > 99
>
>IF _TALLY = 0
>nField =99
>ELSE
>nField = result.nfield
>endif

Paul is right; I forgot about filling the field to the desired length. Otherwise, it should emulate the max() function.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform