Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select but only if there is more than one
Message
From
11/08/2006 04:34:24
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01144743
Message ID:
01144759
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform