Hello
I am getting this error and cant seem to figure out what is going on
Thanks
Rida
WARNING: Apparent symbolic reference THRU_ALL not resolved.
NOTE 137-205: Line generated by the invoked macro "QTRLY_SUMS".
809 PROC APPEND BASE=rptlib.qrtly_sum_totals1 DATA=in_b FORCE; RUN; PROC SQL; CREATE TABLE rptlib.qrtly_sum_totals AS
809 ! SELECT * ,&thru_all. FROM rptlib.qrtly_sum_totals1 ;QUIT;
______
22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
If it is undefined then it will still generate a syntax error. It will just leave the macro reference as it was and the this:
select * &thru_all.
Is not valid syntax.
What is the macro variable &thru_all and is it even needed. By using select * you are already selecting all of the dataset's variables.
Art, CEO, AnalystFinder.com
Well, it could be a constant that should be added to the result.
Either way, it's not assigned at the execution time for this query.
WARNING: Apparent symbolic reference THRU_ALL not resolved.
The above is telling you that the macro variable THUR_ALL does not exist. Therefore the code:
SELECT * , FROM
Is invalid.
If macro variable thru_all is to be used to add a variable (or several variables) to a dataset, it should contain the comma, and your code should look like
proc sql;
create table rptlib.qrtly_sum_totals as
select * &thru_all.
from rptlib.qrtly_sum_totals1;
quit;
Now you will get no ERROR if &thru_all is empty or undefined. The WARNING for an undefined macro variable will persist, though.
If it is undefined then it will still generate a syntax error. It will just leave the macro reference as it was and the this:
select * &thru_all.
Is not valid syntax.
@Tom wrote:
If it is undefined then it will still generate a syntax error. It will just leave the macro reference as it was and the this:
select * &thru_all.
Is not valid syntax.
Correct. Shame on me.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.