Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL MAX(a,b,c,d) equivalent
Message
De
07/02/2005 13:58:10
 
 
À
07/02/2005 13:53:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00984504
Message ID:
00984505
Vues:
16
>I think I should know this but..........
>
>I have a DB2 table with fields Num1, Num2, Num3 (among others)
>
>I need to get the largest of the three numeric fields.
>
>Clearly SELECT MAX(Num1, Num2, Num3) FROM mytable won't work, but it seems as if there ought to be some simple equivalent. I just haven't been able to find it.
>
>Can somebody point me in the right direction?
>
>Thanks.........Rich

Rich,

Try
select max(MAX(Num1, Num2, Num3)) from table ...
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform