Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select but only if there is more than one
Message
De
11/08/2006 04:34:24
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01144743
Message ID:
01144759
Vues:
17
>Is it possible to do this:
>I want to select the accounts, but only if there is more than one account in a category.
>It doesn't like the subquery.
>
>
>Select * From vcf!accounts a ;
>	WHERE a.cCategory In ;
>(Select b.cCategory, Count(b.cCategory) As nmany From vcf!accounts b Group By b.cCategory Having nmany>1) ;
>	ORDER By a.cCategory, a.ndispord, a.cname
>
>
>Cyril
Select * From vcf!accounts a ;
	WHERE cCategory In ;
(Select cCategory From vcf!accounts Group By 1 Having Count(*)>1) ;
	ORDER By cCategory, ndispord, cname
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform