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

Click here to load this message in the networking platform