BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
req41273
Quartz | Level 8

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


1 ACCEPTED SOLUTION

Accepted Solutions
req41273
Quartz | Level 8

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?

 

 

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
req41273
Quartz | Level 8

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?

 

 

Tom
Super User Tom
Super User

The list of variables being created/output is located between the SELECT and the FROM keywords.

select 
  a.*
, b.var1
, b.var2
from
req41273
Quartz | Level 8
Thanks.
r_behata
Barite | Level 11

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
req41273
Quartz | Level 8
Thanks, this worked.
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 8686 views
  • 1 like
  • 4 in conversation