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

Hi all

 

I checked some of the other posts when it comes to this error, but nothing that helped. I am guessing I am tired or frustrated after working on this project for almost 24 hours straight and I am confused as to why this simple little code is giving me this error and why I cant figure out why its creating the error. Here is the code:

PROC SQL;
CREATE TABLE work.mc_c AS
Select mc *
	  ,npi.ProvOrgNm
From work.mc mc
Left Join dbo.NPIDATA npi On mc.Referral_NPI = npi.NPI
;QUIT;

and this is the error in the log:

26         PROC SQL;
27         CREATE TABLE work.mc_c AS
28         
29         Select mc *
30         	  ,npi.ProvOrgNm
              _
              22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, 
              a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.  

31         From work.mc mc
32         Left Join dbo.NPIDATA npi On mc.Referral_NPI = npi.NPI
33         ;
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
33       !  QUIT;

Can anyone else see something that I am missing?? I just want to go sleep!!!!!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
You forgot the period.

Select mc.*
,npi.ProvOrgNm

View solution in original post

3 REPLIES 3
Reeza
Super User
You forgot the period.

Select mc.*
,npi.ProvOrgNm
wheddingsjr
Pyrite | Level 9

Thanks reeza..i just noticed that as you replied...

wheddingsjr
Pyrite | Level 9

Please disregard. I found the issue, and it was simple like I knew it would be. Sleep deprivation is a powerful thing

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 651 views
  • 0 likes
  • 2 in conversation