Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT SQL question
Message
De
26/03/2004 09:41:48
 
 
À
26/03/2004 09:33:38
Steven Kleypas
Tarrant County College District
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00889939
Message ID:
00889945
Vues:
17
>What is the correct syntax to do something like the following?
>
>FUNCTION GetStudentCount
>LPARAMETERS tnCourseID
>RETURN SELECT COUNT(*) FROM v_students WHERE iCourseID = tnCourseID

If you're doing this with native VFP code, there's really no reason to use a SQL SELECT here:
COUNT TO nResult FOR iCourseID = tnCourseID
RETURN nResult
Do keep in mind that COUNT moves the record pointer, so you may want code to save and restore it.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform