BookmarkSubscribeRSS Feed

[SAS 활용 FAQ] The statement cannot be executed by the database because it contains SAS specific SQL.

Started ‎10-11-2021 by
Modified ‎10-11-2021 by
Views 435

[상세내용]

“WARNING: The statement cannot be executed by the database because it contains SAS specific SQL.” 메시지가 발생하면서 job 실행이 안되요. 

특정 배치에서 오류가 지속으로 발생하고 있는데, 로그를 보니 아래 부분이 문제인 것 같습니다. 어떻게 처리하면 될까요?

226

PROC SQL;

227

CREATE TABLE AB AS

228

SELECT    *

229

FROM       BC

230

GROUP BY DE, FG

231

HAVING COUNT(DISTINCT AB)>=2

232

;

WARNING: The statement cannot be executed by the database because it contains SAS specific SQL. NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table BC.AB created, with 0 rows and 39 columns.

 

[답변]

해당 오류메시지는 실행하신 PROC SQL 문장이 대상 ORACLE에서 실행될 수 없는 구문을 가지고 있어서 발생합니다. 아래 Link를 참고하셔서 SQL Pass-Through 구문으로 수정후 실행해 보시기 바 랍니다.

 

https://go.documentation.sas.com/?docsetId=lrcon&docsetTarget=n1kbstf7vw0qcjn1ibfc8c78a9lc.htm &docsetVersion=9.4&locale=en

 

PROC SQL;

CONNECT TO ORACLE AS MYCONN (USER=xxxx PASSWORD=xxxx... );

CREATE TABLE &LIB_A.AB SELECT * FROM CONNECTION TO MYCONN

(

SELECT    *

FROM BC

GROUP BY DE, FG

HAVING    COUNT(DISTINCT AB)>=2

)

;

QUIT;

Comments

I can't read your comments.  But I have also gotten the WARNING you got.  I removed the DBIDIRECTEXEC option to get rid of the warning.  SAS R&D says that if you use SAS specific SQL against a native SAS table with DBIDIRECTEXEC and sastrace=',,,d' then you should expect to get that warning - it is "working as designed".

 

If that is working as designed, it sure isn't working as users expect.  There should at least be a technote.

Version history
Last update:
‎10-11-2021 09:54 PM
Updated by:
Contributors

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Article Labels
Article Tags