Date: Wed, 18 Feb 2004 12:09:32 -0700
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: Persistent error in where statement...
Content-Type: text/plain; charset=us-ascii
to see if the macro variables are resolving to something unexpected.
My guess is that JobArea is a character variable; you seem to be
treating it as a numeric variable.
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA
>>> "Jose Santos" <j-santos@TAMU.EDU> 02/18/2004 11:05 AM >>>
Following is a log from a program in which I'm using several macro
variables to filter the original data set.
46 +where JobArea=&jobarea AND yearswit=&yearswith AND
edulevel=&educationlevel AND (pcttime between &maxpercenttime and
The SAS System
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &,
**, +, -, /, <, <=, <>, =, >, >=, AND, EQ, GE, GT, LE, LT, NE, OR, ^=,
ERROR 76-322: Syntax error, statement will be ignored.
47 +AND sfyear="&startyear" and efyear="&endyear" AND
ERROR: Syntax error while parsing WHERE clause.
It's saying that I got a problem with yearswit (there's really no "h")
database variable. To discount the problem that it's not due to the
yearswit variable that's causing it, I deleted the variable from the
statement. After deletion, the edulevel variable moved to the same
physical position where the deleted yearswit=&yearswith was before and
showing the same error. I already checked all my macro variables
the web form and the variables in the databsse being referenced by my
statement. It seems that's there is something in the physical
of the variable within the where statement that's causing a problem.
I am not using any option statement to run the program.
My globals are as follows:
+%GLOBAL competencies competencies0 startyear endyear jobarea
educationlevel minpercenttime maxpercenttime;
I really could use some help on this.