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
Hello @Radwan,
First, I'd correct the typo in the WHERE clause:
b,code
should read
b.code
Then rerun the step.
Hello @Radwan,
First, I'd correct the typo in the WHERE clause:
b,code
should read
b.code
Then rerun the step.
thaaaaaaaannnnnnnnxxxx
i got it
u r right
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;
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
please I m stuck with my model
unfortunately when i regressed my model the results came up so strange.
my model as follows
and then i used the following codebut the results looked as followsproc reg data=models outest=regress1; model CFLO_real=TA1 S1 S2; by year1; run;
SAS OutputModel: MODEL1Dependent Variable: CFLO_realyear1=2003Number 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
1 1.90425 1.90425 . . 0 0 . 1 1.90425
Root MSER-SquareDependent MeanAdj R-SqCoeff Var
. 1.0000 -1.37994 . .
please solve my issue
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.