I want to use the month and year from today's date and use that as a column in SQL table . Below is the code that I am using to get the month and year : data _null_; CUR_MONTH =today(); format CUR_MONTH yymmn6.; put CUR_MONTH; run; Now , I want to use the variable CUR_MONTH in SELECT statement , something like : PROC SQL; SELECT &CUR_MONTH , ID , NAME FROM ABC; But , I get Error ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, (, *, +, -, ALL, BTRIM, CALCULATED, CASE, DISTINCT, EXISTS, INPUT, NOT, PUT, SUBSTRING, TRANSLATE, UNIQUE, USER, ^, ~. Can someone please guide . Thanks.
... View more