Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MIN() MAX() in SQL on multiple fields
Message
De
08/04/2015 17:04:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
07/04/2015 12:57:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01617834
Message ID:
01618050
Vues:
33
>>>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....
>>
>>Why not
>>
>>select min(field1) as min1, min(field2) as field2 ...
>>
>>lnMin=min(min1, min1, ...)
>
>Don't think that's what he wants. I think in each record, he wants one field that contains the minimum of those field for that record.

Ooops. There was an implied aggregation in my head.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform