Any help on why this error 73-322 is generating?
_
proc sql noprint;
121 create table MBR as
122 select a.*, b.description as PROV_SPECIALTY_DESCRIP
123 from MBR a left join sasave.prov_type_master_map to_prov_spe b
_
73
76
ERROR 73-322: Expecting an ON.
ERROR 76-322: Syntax error, statement will be ignored.
124 on a.prov_specialty_type = b.type_or_spec_code;
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
125 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
126 run;
127
128 data MBR(drop=PROV_SPECIALTY_DESCRIP);
129 set MBR;
130
131 description=PROV_SPECIALTY_DESCRIP;
132 run;
76
Thanks. I made the change accordingly using a.variablename=b.variablename. It works. Is there a way I can modified the line of SAS code to drop set ( include) a second variable on table b?
Perhaps you need something like this
from MBR a left join sasave.prov_type_master_map b
on a.variablename=b.variablename
After the second data set name of a left join (in this case sasave.prov_type_master_map), you must use the ON clause at that point (or you can have an alias followed by the ON clause). Your text there:
to_prov_spe
isn't allowed, this isn't an alias and it isn't an ON clause.
Thanks. I made the change accordingly using a.variablename=b.variablename. It works. Is there a way I can modified the line of SAS code to drop set ( include) a second variable on table b?
The list of variables being created/output is located between the SELECT and the FROM keywords.
select
a.*
, b.var1
, b.var2
from
Review the line below, it seems to have an unexpected space between "_map to"
left join sasave.prov_type_master_map to_prov_spe b
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.