>Count to JanCount for Alltrim(Crimetype) = "B&E Garage" and Month(CrimeDate)= 1 ; >or Alltrim(Crimetype)= "B&E Home" and Month(CrimeDate)= 1 ; >or Alltrim(Crimetype)= "Home invasion" and Month(CrimeDate)= 1 ; >or Alltrim(Crimetype)= "B&E Business" and Month(CrimeDate)= 1 ; >or Alltrim(Crimetype)= "B&E Cabin" and Month(CrimeDate)= 1 >When I expand your code as follows, it runs without error:
CREATE CURSOR Test ; ( CrimeType C(20) ; , CrimeDate D ) SELECT Test * Following section is exactly the same as Grady's sample: Count to JanCount for Alltrim(Crimetype) = "B&E Garage" and Month(CrimeDate)= 1 ; or Alltrim(Crimetype)= "B&E Home" and Month(CrimeDate)= 1 ; or Alltrim(Crimetype)= "Home invasion" and Month(CrimeDate)= 1 ; or Alltrim(Crimetype)= "B&E Business" and Month(CrimeDate)= 1 ; or Alltrim(Crimetype)= "B&E Cabin" and Month(CrimeDate)= 1 * End of original sample section ?JanCount USE IN TestSo, the answer is there is nothing wrong with that section of code. As an aside:
COUNT TO JanCount ; FOR INLIST( ALLTRIM( CrimeType ), "B&E Garage", "B&E Home", "Home invasion", "B&E Business", "B&E Cabin" ) ; AND MONTH( CrimeDate ) = 1As for why you might be having a problem:
* This is a comment, the next comment line ends in a semicolon making the first line * of "actual code" a "continuation" of this comment; Count to JanCount for Alltrim(Crimetype) = "B&E Garage" and Month(CrimeDate)= 1 ; or Alltrim(Crimetype)= "B&E Home" and Month(CrimeDate)= 1 ; ...- Do you have any #DEFINEs set that may be changing the code at compile time?