Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count the records
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01310624
Message ID:
01311480
Vues:
23
>Sorry, Naomi i have not understand.
>My table name is dlyatten and filed name is Category and in Category i want to count the records if A,A,A is adjasent.
>e.g
>A is absent of student. ( it is dialy attend (roll call) from.
>I want to see a student if he make six absences regulary.

I was thinking about your problem and I believe it can also be solved with projection, e.g.
select my.*, ;
(select count(*) as TotalAbsences ;
from myTable where Category = 'A' and ;
myTable.StudentID = my.StudentID) as TotalAbsences ;
from myTable my ;
having TotalAbsences >=6
Not tested.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform