Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count(*)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Count(*)
Divers
Thread ID:
00930754
Message ID:
00930754
Vues:
39
I tried to get a Count using the COUNT(*) function in a SQL Select statement. Depending on how I access a table, I get two differing results.

(1) For example if I open a table AGAIN and use the select statement against that table, I get a 0 result which is incorrect.
USE APTRXDST AGAIN ALIAS APTRXDST_AGAIN IN 0
SELECT COUNT(*);
   FROM APTRXDST_AGAIN ;
   WHERE VOUCHER_NO = oApp.Voucher_No ;
   INTO CURSOR tmpCount
I then look at the quantity found in tmpCount.cnt to determine if it is a 0 value or a 1 value or more.

(2) If I use the original table, I get the correct result of 1 record.
However, I am concerned that using this method will cause my record pointer of the APTRXDST table to go to the bottom or end of the file due to the COUNT() function.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform