Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP8 GROUP BY Restriction
Message
 
 
À
28/05/2003 11:57:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00793077
Message ID:
00793563
Vues:
24
>Hi Sergey,
>
>>You want to retrive 2 records, one for EmpPK = 00001 and second for 00002, right?.
> Right.
>
>>The question is from which record should fld1 and fld2 come from for each of those keys?
> I don't care, any one will do because either:
> 1. I know that all the values of fld2 are identical for a given fld1 -or-
> 2. It doesn't matter which value of fld2 I get, any value is ok
>
>Thanks, Chaim

If you don't care, enclose fld1 and fld2 into MIN or MAX SQL function.
SELECT EmpPK, MAX(fld1), MAX(fld2) ;
  FROM mytable ;
  GROUP BY 1
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform