Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oops! MIN & MAX in SQL commands
Message
De
13/02/2003 01:35:23
 
 
À
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:
00752593
Vues:
22
>Sorry... won't work...
>
>Your select statement will choose the last record that has a higher value than 99.

Are you sure? Try this test.
*** create the data
CREATE CURSOR test (nTest n(3))
INSERT into test VALUES (1)
INSERT into test VALUES (99)
INSERT into test VALUES (100)
And then this select statement.
SELECT IIF(nTest>99,ntest,099) ntest FROM test
It returns 3 records.
Ntest
 99  
 99  
100  
NOTE that you need the value 099 because that forces the result to 3 digits.
If you use 99 instead you will get ** for values > 99 as they are fitted into a two digit field in the result.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform