Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditionally counting in SQL
Message
De
08/05/2005 13:50:40
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01012011
Message ID:
01012024
Vues:
29
Dear Sir,

Your following command work fine
sum(iif(mode="L",1,0)) to bagsLC 
sum(iif(mode="L",weight,0)) to bagsLS
But when I add your codes in my SQL as
SELECT MONTH(date) as nmonth,;
	CMONTH(date) as cmonth,;
	YEAR(date) as nyear,;
	sum(weight) as weight;
	SUM(iif(mode="L",1,0)) as bagsLC ;
	sum(iif(mode="L",weight,0)) as bagsLS;
	from avlbook;
	GROUP BY nmonth,nyear ;
	ORDER BY nyear,nmonth;
	INTO CURSOR Temp
Then it show following error message
Command Contains unrecoganise command....

What is error in my SQL, please modify.

Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform