I'm unsure how to correct the syntax inside of my proc sql in SAS. My code goes something like the following:
proc sql;
create table HI
as select [columns]
from [table]
where column1 not in ('..', '..', '..') /*This has no errors*/
AND column2 in ('...', '...', '...') /*This has no errors*/
AND column3 in (('...','...','...',.......)
or column3 like ('J%')) /*This AND statement gives the errors*/
The first error is that it is expecting a SELECT and has underlined the first '...' for the condition on column3. (Error 79-322)
The next error is at the end of the conditions on column 3 before the OR statement. It says that it is expecting one of the following: a quoted string, !, !!, &, *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?,..... (Error 22-322)
Then there are two more errors that say the symbol is not recognized and another that the statement will be ignored. --but I figure these will correct if the others are corrected.
Any help is appreciated :)