Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oops! MIN & MAX in SQL commands
Message
From
13/02/2003 01:35:23
 
 
To
12/02/2003 17:01:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00752219
Message ID:
00752593
Views:
15
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform