Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MIN() MAX() in SQL on multiple fields
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01617834
Message ID:
01617836
Views:
77
This message has been marked as the solution to the initial question of the thread.
>I've possibly forgotten something trivial or learned something new today...
>
>How, in an sql statement, do you get the min value of, say, 5 values?
>
>I try something like SELECT MIN(field1,field2,field3,field4) FROM MYFILE
>
>and VFP wants to assume MIN() is aggregation of several rows....
>
>Thanks in advance.

You can not use MIN/MAX function in SQL Select. You would need to use nested IIF and re-create the logic for MIN/MAX.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform