Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL command
Message
De
10/08/1999 21:58:17
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00251982
Message ID:
00252329
Vues:
7
Chris,

You can't do a topx in a sub query. It must be a 2-pass process of some sort. I did mine by selecting a list of the OrderId's, seeking in the table (ordered descending by OrderId, Item), appending the next x onto my report cursor. I also had to add up the "all other" for my report.


>Anyone know how to return groups of a particular number.
>I want it to work like TOP 3 but within groups.
>For example I want to generate a cursor that lists all orders but only the first 3 or so line items.
>
>Assuming that all orders have more than 3 items and I want to see the the first 3 of each; I would want to show the following and pitch anything else.
>
>OrderId1
> Item1
> Item2
> ITem3
>OrderId2
> Item1
> Item2
> ITem3
>
>Thanks,
>Chris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform