Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF in Select
Message
 
To
24/11/1998 14:42:14
Carl Sarazin
Statistics Canada
Ottawa, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00161059
Message ID:
00161075
Views:
17
>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?

You mean, like:
SELECT SUM(IIF(rrspCont = 0, 1, IIF(rrspCont = 1, 1, 0))) AS rrspSum ;
FROM...
That works, but I'm not sure if that's what you're trying to do....
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform