Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing operand (apparently)
Message
De
31/12/2006 16:22:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01181122
Message ID:
01181135
Vues:
10
>Correction. The IN operator is only valid in SQL. For COUNT it should be INLIST
>Count to JanCount for ;
>		INLIST(Alltrim(Crimetype), "B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) ;
>			and Month(CrimeDate)= 1
>
>
>
>>Thanks for the feedback Sergey. I'll kick my computer a few times and see if that will fix it. :=) I'll also change the code. Thanks sir.
--------------------------------------------------
I am still getting an error after the code change.
I am gathering stats for a twelve month graph from a crime file.
Here is all the code (It's in a menu procedure)

Each line of code that counts is generating the error.
I get this error message "Command contains unrecognized phrase/keyword"
GraphTitle = "All B&E"
JanCount = 0
FebCount = 0
MarCount = 0
AprCount = 0
MayCount = 0
JunCount = 0
JulCount = 0
AugCount = 0
SepCount = 0
OctCount = 0
NovCount = 0
DecCount = 0

Select localcrime1
Count to JanCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 1
Select Analyse
Goto 1
Replace statvalue with JanCount
Select localcrime1
Count to FebCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 2
Select analyse
Goto 2
Replace statvalue with FebCount
Select localcrime1
Count to MarCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 3
Select Analyse
Goto 3
Replace statvalue with MarCount
Select localcrime1
Count to AprCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 4
Select Analyse
Goto 4
Replace statvalue with AprCount
Select localcrime1
Count to MayCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 5
Select Analyse
Goto 5
Replace statvalue with MayCount
Select localcrime1
Count to JunCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 6
Select Analyse
Goto 6
Replace statvalue with JunCount
Select localcrime1
Count to Julcount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 7
Select Analyse
Goto 7
Replace statvalue with JulCount
Select localcrime1
Count to AugCount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 8
Select Analyse
Goto 8
Replace statvalue with AugCount
Select localcrime1
Count to Sepcount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 9
Select Analyse
Goto 9
Replace statvalue with SepCount
Select localcrime1
Count to Octcount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 10
Select Analyse
Goto 10
Replace statvalue with OctCount
Select localcrime1
Count to Novcount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 11
Select Analyse
Goto 11
Replace statvalue with NovCount
Select localcrime1
Count to Deccount for Alltrim(Crimetype) INLIST("B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) and Month(CrimeDate)= 12
Select Analyse
Goto 12
Replace statvalue with DecCount
Do form analtemp
I ain't skeert of nuttin eh?
Yikes! What was that?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform