Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to count records with IIF condition
Message
De
22/02/2007 09:50:51
Rasheed Al Rasheed
Riyadh Armed Forces Hospital
Riyadh, Arabie Saoudite
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to count records with IIF condition
Divers
Thread ID:
01197932
Message ID:
01197932
Vues:
56
Hi All

I need to count records meeting a cerain criteria in a select statement. I constructed the following code
Select  A.Code, Count(Iif(A.SB="B", a.code,000000000)) As sbbtm, ;
			count(Iif(A.SB="S", A.code,000000000)) As sbstm;
			FROM M_070219 A ;
			where !EMPTY(A.CODE) ;
			ORDER By  A.Code ;
			group By  A.Code ;
			INTO Cursor cSb_1 Readwrite
In the case I get the same count for A.SB = "B" and A.SB="S" where infact they shoud have different counts.

Any respone is appreciated.

Rasheed
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform