Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF in Select
Message
De
24/11/1998 14:42:14
Carl Sarazin
Statistics Canada
Ottawa, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
IIF in Select
Divers
Thread ID:
00161059
Message ID:
00161059
Vues:
64
I'm trying to create a single SQL statement which will give a number of different count(conditional) reading the same variable.

What I tried is using "sum(IIF(,,)) as xxx" several times in my select.
Here is an instance of what I did.

SELECT sum(IIF(rrspcont = 0,1,0)) as rrsp0,
sum(IIF(rrspcont = 1,1,0)) as rrsp1, and so fourth
FROM...

Can I group the IIF in another IIF and still keep the same results?
(sum(IIF(rrspcont = 0,1, IIF(...) without changing the variable
name to store the result?

Does anyone know if this is possible?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform