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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.