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

Hello everyone 

please someone explain to me how to solve the error (ERROR 79-322: Expecting a ).

when i run this code 

proc sql;
create table main_vars as
select a.code, a.year1,
a.TA,a.TCA,a.cash,a.RECE,a.TCL,a.Depreciation,a.DCL,b.gross_revenue,d.OPERATION_CASH_FLOW,d.INVT_CASH_FLOW
from radwan4 as a, alkebsee1 as b, cashflow as d
where a.code=b,code=d.code and  a.year1=b.year1=d.year1;
quit;

i got this error message 


126 proc sql;
127 create table main_vars as
128 select a.code, a.year1,
129 a.TA,a.TCA,a.cash,a.RECE,a.TCL,a.Depreciation,a.DCL,b.gross_revenue,d.OPERATION_CASH_FLOW,d.INVT_
129! CASH_FLOW
130 from radwan4 as a, alkebsee1 as b, cashflow as d
131 where a.code=b,code=d.code and a.year1=b.year1=d.year1;
-
79
131 where a.code=b,code=d.code and a.year1=b.year1=d.year1;
-
79
ERROR 79-322: Expecting a (.

ERROR 79-322: Expecting a ).

132 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Radwan,

 

First, I'd correct the typo in the WHERE clause:

b,code

should read

b.code

Then rerun the step.

View solution in original post

6 REPLIES 6
FreelanceReinh
Jade | Level 19

Hello @Radwan,

 

First, I'd correct the typo in the WHERE clause:

b,code

should read

b.code

Then rerun the step.

Radwan
Quartz | Level 8

thaaaaaaaannnnnnnnxxxx 

i got it 

u r right 

PeterClemmensen
Tourmaline | Level 20

I think this is what you want. I don't think SQL lets you do a=b=c. You have to go with a=b and b=c like this

 

proc sql;
create table main_vars as
select a.code, a.year1,
a.TA,a.TCA,a.cash,a.RECE,a.TCL,a.Depreciation,a.DCL,b.gross_revenue,d.OPERATION_CASH_FLOW,d.INVT_CASH_FLOW
from radwan4 as a, alkebsee1 as b, cashflow as d
where a.code=b.code and 
      b.code=d.code and 
      a.year1=b.year1 and 
      b.year1=d.year1;
quit;
art297
Opal | Level 21

I would follow @FreelanceReinh's suggestion. There is nothing wrong with the expression: 

where a.code=b.code=d.code and  a.year1=b.year1=d.year1

Your only problem appears to be that you used a comma rather than a period in stating b.code

 

Art, CEO, AnalystFinder.com

 

Radwan
Quartz | Level 8
thank you
i got it
Radwan
Quartz | Level 8

please I m stuck with my model 

unfortunately when i regressed my model the results came up so strange.

my model as follows

  


radwann.png

and then i used the following code 
proc reg data=models outest=regress1;
model CFLO_real=TA1 S1 S2;
by year1;
run;
but the results looked as follows 
SAS Output
 
Model: MODEL1
Dependent Variable: CFLO_real
Number of Observations ReadNumber of Observations Used
1
1

 


Note:No intercept in model. R-Square is redefined.
Analysis of VarianceSource DF Sum ofSquares MeanSquare F Value Pr > FModelErrorUncorrected Total
11.904251.90425..
00.  
11.90425   

 

Root MSER-SquareDependent MeanAdj R-SqCoeff Var 
.1.0000
-1.37994.
. 

 

 

please solve my issue