m*******g 发帖数: 3044 | 1 just run SAS, got error message:
ERROR 22-322: Syntax error, expecting one of the following: GROUP, HAVING,
ORDER, WHERE.
ERROR 76-322: Syntax error, statement will be ignored.
318
319 where
320 b.moend=ldf.monthend and
321 b.ay=ldf.ay;
322 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
my code is :
proc sql;
create table sasuser.aggloss_mcr as
select
b.sumofpaid_, ldf.mcr, b.sumofpaid_/ldf.mcr as completedloss
from
sasuser.claims_m b
sasuser.ldf
where
b.moend=ldf.monthend and
b.ay=ldf.ay;
quit;
where is problem? |
R*****g 发帖数: 99 | 2 这两个地方有嫌疑:
1.
sasuser.claims_m b
sasuser.ldf (改为 sasuser.ldf ldf ?)
2. select a/b as calculated c? 不太记得这个地方要不要用calculated了,很有可能跟别的什么搞混了。。。[确定了,这种情况是不需要的,即使需要也不是用在这里,是用在where语句]
不过好像这两个都不是跟错误信息提示的内容相关的。等cow人们来更正
【在 m*******g 的大作中提到】 : just run SAS, got error message: : ERROR 22-322: Syntax error, expecting one of the following: GROUP, HAVING, : ORDER, WHERE. : ERROR 76-322: Syntax error, statement will be ignored. : 318 : 319 where : 320 b.moend=ldf.monthend and : 321 b.ay=ldf.ay; : 322 quit; : NOTE: The SAS System stopped processing this step because of errors.
|
D******n 发帖数: 2836 | |
R*****g 发帖数: 99 | 4 as 可以省略的
【在 D******n 的大作中提到】 : as b
|
A*******s 发帖数: 3942 | 5 missing a comma between two table names
【在 m*******g 的大作中提到】 : just run SAS, got error message: : ERROR 22-322: Syntax error, expecting one of the following: GROUP, HAVING, : ORDER, WHERE. : ERROR 76-322: Syntax error, statement will be ignored. : 318 : 319 where : 320 b.moend=ldf.monthend and : 321 b.ay=ldf.ay; : 322 quit; : NOTE: The SAS System stopped processing this step because of errors.
|
R*****g 发帖数: 99 | 6 火眼金睛!
看来光看不练(偶几乎没用过sql)还是不行的,始终不扎实,叹!
【在 A*******s 的大作中提到】 : missing a comma between two table names
|
A*******s 发帖数: 3942 | 7 that's because i make such mistakes all the time, haha
【在 R*****g 的大作中提到】 : 火眼金睛! : 看来光看不练(偶几乎没用过sql)还是不行的,始终不扎实,叹!
|
R*****g 发帖数: 99 | 8 haha ,印证了这句话(今早上刚摘录下来的):
"One must learn by doing the thing; for though you think you know it, you
have no certainty, until you try." --Sophocles
【在 A*******s 的大作中提到】 : that's because i make such mistakes all the time, haha
|
m*******g 发帖数: 3044 | 9 you are my hero
【在 A*******s 的大作中提到】 : missing a comma between two table names
|
m*******g 发帖数: 3044 | 10 you are my hero
【在 A*******s 的大作中提到】 : missing a comma between two table names
|
C*****O 发帖数: 82 | 11 Missing a comma is usually indicated by this kind of error message. |