07-10-2015 04:22 PM
Anyone who can help, I am having some trouble with some proc sql code.
&sty is defined earlier as a global macro variable as follows:
The code I'm using is:
CREATE TABLE SENSLOPE AS
SELECT STATION, SEASON, MONTH, _&STY., _&STY.+1, _&STY.+1 - _&STY. AS D_&STY.+1,
GROUP BY STATION, SEASON, MONTH;
Obviously this is a case of garbage in garbage out as I am getting the following messages. I'm not very familiar with sql coding and combining macro codes with it but any clues would help. It may or may not be obvious that my next step in this program is to macroize this thing to make multiple comparisons of multiple columns (one each for different years) across multiple rows although I have yet to try that here. Any additional suggestions along those lines short of writing the code for me would be helpful. Thanks in advance.
NOTE: Line generated by the macro variable "STY".
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, '.', /, <, <=, <>,
=, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET,
OR, ^=, |, ||, ~=.
ERROR 76-322: Syntax error, statement will be ignored.
Need further help from the community? Please ask a new question.