PROC SQL NOPRINT; CREATE TABLE PERF_ACCT AS SELECT DISTINCT ORG_CODE, ACCOUNT_NO, LOGO, DATE_CARD_OPENED, BLOCK_CODE_1 FROM CREDIT_CARD; *WHERE EFF_FROM_DATE<="&PERF_END"D AND (EFF_TO_DATE>"&PERF_END"D OR EFF_TO_DATE=.); QUIT;
generally I know that * means commenting a statement, however, here I am suspicious. Could you take a look and confirm for me if where statement above is commented and what about the line starting with AND ..., is it also commented when it is on the next line?
Why don't you run the code and see?
Minimize the question to its simplest form and perform a test run:
proc sql;
select *
from sashelp.class
;
*where 1 eq 2
and 2 eq 3;
quit;
- Cheers -
Line breaks have no effect on where a statement begins or ends; statements start where the previous statement ended, and end with a semicolon.
Since you are showing code with macro variables there is a question about is this step in the middle of a macro (%macro/%mend; code block) or not.
You can get odd results using statement comments inside macros depending on your intent.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.