Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditionally counting in SQL
Message
 
 
À
08/05/2005 14:24:32
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:
01012028
Vues:
20
Tariq,

That error on a SQL usually means one of three things

1) you are missing a ; at the enf of the line
2) you are missing a , between each of the columns
3) you have an extra , in the column list

you are still missing two commas after nyear and weight

>I added "," between sums according to your advise as follows
>
>SELECT MONTH(date) as nmonth,;
>	CMONTH(date) as cmonth,;
>	YEAR(date) as nyear;
>	sum(weight) as weight;
>	sum(iif(mode="L",weight,1,0)) as bagsLC, ;
>	sum(iif(mode="b",weight,1,0)) as bagsLS;
>	from avlbook;
>	GROUP BY nmonth,nyear ;
>	ORDER BY nyear,nmonth;
>	INTO CURSOR Temp
>
>But the problem is still exists as
>
>Command contains unrecognized command/phrase...
>
>Please modify my codes again
>
>Thnaks
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform