Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you compare dates
Message
De
04/03/2010 12:46:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01452456
Message ID:
01452532
Vues:
40
>
>dStart = DATE(2010,3,4)
>SELECT * FROM Client WHERE Client.DateApp = dStart INTO CURSOR MyResult
>
>? RECCOUNT("MyResult")
>? _TALLY
>
>
>Given Client data of:
>
>
>ID                   DateApp
>1                    01/01/2010
>2                    01/28/2010
>3                    03/04/2010
>
>
>The two ?'s above would result in RECCOUNT() = 3 and _TALLY = 1 respectively given that VFP would optimize the SELECT by essentially doing a;
>
>
>USE Client AGAIN ALIAS MyResult
>SET FILTER TO DateApp = dStart
>
>
>If you add the NOFILTER option to the SELECT as in:
>
>
>dStart = DATE(2010,3,4)
>SELECT * FROM Client WHERE Client.DateApp = dStart INTO CURSOR MyResult NOFILTER
>
>
>then RECCOUNT() and _TALLY would be equal because the NOFILTER tells VFP NOT to do the USE ... AGAIN with a SET FILTER to get the results cursor.


ohh i see hmm. Didnt kno that...i normally tested reccount() by sayin if REccount()=0 that kinda way
but thanks 4 clearing up the syntax guess its still safe to use as long as i use nofilter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform