Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subquery in SELECT clause
Message
 
 
To
31/07/2004 01:17:29
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00929817
Message ID:
00929895
Views:
8
>>Here's IIF method.
SELECT id, ;
>>	SUM(IIF(column_name = "January", value, 0) AS January, ;
>>	...
>>	SUM(IIF(column_name = "December", value, 0) AS December ;
>>FROM mytable ;
>>GROUP BY id
>>
>
>The other method makes it possible to write generic code, I believe.

I don't see how.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform