BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

The SELECT statement should not end with a comma.

Data never sleeps

View solution in original post

7 REPLIES 7
LinusH
Tourmaline | Level 20

The SELECT statement should not end with a comma.

Data never sleeps
ari2495
Obsidian | Level 7

ok thanks, so here it is, error still there 

ari2495_0-1668429998349.png

 

PaigeMiller
Diamond | Level 26

in PROC SQL, in the SELECT statement, variable names should be separated by a comma. You do not have a comma there between CODICE_CLUSTER and RATING.

--
Paige Miller
Astounding
PROC Star
Also note, the name of a SAS data set does not require quotes around it. The CREATE TABLE name is correct but the FROM name is not.
ari2495
Obsidian | Level 7
ok thanks, so here it is, error still there
please see screenshot on the comment above
Tom
Super User Tom
Super User

Don't post a photograph of the text in your SAS log!  Just copy the text and post that. Use the insert code editor button to get a pop-up window to paste the text.

 

When writing long statements that require multiple line do NOT hide the continuation/conjunction characters as the END of the line.  That makes the code difficult for humans to scan.  Place such things at the start of the NEW line.

 

Here is code the mimic the issue in your code:

 

create table want as
  select var1
       , var2
       , var3
       , sum(var4) as total_var4
       ,
  from have 
  group by var1
;

Can you see the problem now?

ari2495
Obsidian | Level 7
thank you. so sorry, i'm learning...

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 640 views
  • 3 likes
  • 5 in conversation