BookmarkSubscribeRSS Feed
joon1
Quartz | Level 8

Dear Madam/Sir,

 

I would like to construct standard deviation of ROA with a rolling window of the past five years.

After referring several comments in this forum, I made the following command and had the error messages.

 

proc sql;

create table m24 as select *, (std(a.roa) from have where a.fyear between

a.fyear-6 and a.fyear-1 and a.gvkey) from m23 as a;

quit;

 

Any of your help will be highly appreciated.

 

Sincerely,

Joon

4 REPLIES 4
joon1
Quartz | Level 8
The error messages are as follows:


proc sql;

497 create table m24 as select *, (std(a.roa) from have where a.fyear
between

----

79

498 a.fyear-6 and a.fyear-1 and a.gvkey) from m23 as a;

-

22

76

ERROR 79-322: Expecting a ).



ERROR 22-322: Syntax error, expecting one of the following: ;, !, !!, &, *,
**, +, -, /, <, <=,

<>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, EXCEPT, GE,
GET, GROUP, GT, GTT,

HAVING, IN, INTERSECT, IS, LE, LET, LIKE, LT, LTT, NE, NET,
NOT, NOTIN, OR, ORDER,

OUTER, UNION, ^, ^=, |, ||, ~, ~=.



ERROR 76-322: Syntax error, statement will be ignored.
ballardw
Super User

Please post LOG results in a code box opened using the forum's {I} icon. As you can see the forum reformats text making the diagnostics from the error message move and making it very hard to read.

Also it should cut down on the extra blank lines.

 

The underscore characters should appear under where SAS detects the error.

 

 

joon1
Quartz | Level 8

Thank you so much for your response

I have attached the word file containing the error log. Your advice will be highly appreciated.

 

Thanks

Joon

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
  • 4 replies
  • 719 views
  • 0 likes
  • 3 in conversation