Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditionally counting in SQL
Message
From
09/05/2005 03:01:51
 
 
To
08/05/2005 14:24:32
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01012011
Message ID:
01012105
Views:
22
SELECT MONTH(date) as nmonth;
,	CMONTH(date) as smonth;
,	YEAR(date) as nyear;
,	sum(weight) as weight;
,	sum(iif(mode="L",1,0)) as bagsLC ;
,	sum(iif(mode="b",1,0)) as bagsLS ;
	from avlbook ;
	GROUP BY nyear,nmonth ; -- this is a implicit ORDER BY
	INTO CURSOR Temp
Previous
Reply
Map
View

Click here to load this message in the networking platform