Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get count plus detail in single SQL?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00663662
Message ID:
00663794
Vues:
9
>Try
SELECT Questions.*, COUNT(UserCode) AS VoteCount, ;
>          SUM( IIF(UserCode = lcUserCode, 1, 0)) AS VoteCountCurentUser ;
>	FROM Questions ;
>	LEFT JOIN Votes ;
>	WHERE Questions.SurveyPK=Votes.SurveyPK ;
>	ORDER BY CloseDate DESC ;
>	GROUP BY SurveyPK ;
>	INTO CURSOR TQuery
>
Very nice, Serg. Thanks
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform