Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limit result set of a query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00019190
Message ID:
00019191
Vues:
44
>I have two tables that have been linked into a view. I have tried doing some SELECT * where (criteria) into cursor abc. I only want to return a total of no more than say 50 records regardless of whether the query result set contains 100 or 1000 records.
>
>I have tried using the cursorsetprop( 'maxrecords', 50 ) function, which always returns .t., but it always returns the entire result set.
>
>What am I doing wrong? Right now, I have resorted to doing the query to a table, then doing a second query where recno() < 50 into the final result set.
>
>tia. Stephen


If you have VFP 5.0, there is an additional parameter with the SELECT statement that gives you the TOP nRecords, or TOP PERCENT of the table, nice new features.

HTH, Greg
** ** ** ** ** ** ** ** ** ** **
Gregory Cummines
Visual FoxPro 3.0/5.0
C/C++ Applications
** ** ** ** ** ** ** ** ** ** **
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform