Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reccount()
Message
De
25/08/2016 12:19:53
 
 
À
25/08/2016 12:14:00
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01639965
Message ID:
01639970
Vues:
118
>>>Reccount() gives a total of all records in a table whether deleted, or not. What is the most efficient way to determine the number of 'not' deleted records?
>>>
>>>Many thanks!
>>
>>You have to count them.
>>Select count(*) from yourtable where !deleted() into array laDummy
>>?laDummy
>>Note that you must have Set Deleted On for this to work.
>
>There is no need to use deleted() in the query. Functions that take an alias are dangerous in SQL because they do not reference the cursors in the query. Only set deleted on.

Mike,

what would than be according to your knowledge a better SQL select statement than the one provided here by Tore?

Regards,
Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform