rsubmit;
proc sql;
create table wpffasdekpr2 as
select polnum, ordnnr, brkd, fsnr, fvpkd, mnr, mlopnr,coverfrom, coverto, nationalkey, exposuretype, COActivityCode, sum(COSumInsured) as SumIns, sum(AnnualBaseAmt) as SumAmt from wpffasdekpr
group by
polnum, ordnnr, brkd, fsnr, fvpkd, mnr, mlopnr,coverfrom, coverto, nationalkey, exposuretype, COActivityCode;
quit;
endrsubmit;
此操作上類似於下表:SQL Group By in SAS - alternative?
我預計前4行被這句話給壓縮成一個,並正在總結最右邊的兩個變量。但是,該聲明不起作用。輸出表看起來像輸入表。兩個問題: 1.這是爲什麼?在通常的SQL我很積極,它會工作。 2.我怎樣才能達到預期的效果?
登錄:
508 rsubmit;
NOTE: Remote submit to SESKUX01 commencing.
1391 proc sql;
1392 create table wpffasdekpr2 as
1393 select polnum, ordnnr, brkd, fsnr, fvpkd, mnr, mlopnr,coverfrom, coverto, nationalkey, exposuretype, COActivityCode, sum(COSumInsured) as COsumInsured2, sum(AnnualBaseAmt) as AnnualBaseAmt2
1393! from wpffasdekpr
1394 group by
1395 polnum, ordnnr, brkd, fsnr, fvpkd, mnr, mlopnr,coverfrom, coverto, nationalkey, exposuretype, COActivityCode;
NOTE: Compressing data set WORK.WPFFASDEKPR2 increased size by 5.17 percent.
Compressed is 29614 pages; un-compressed would require 28159 pages.
NOTE: Table WORK.WPFFASDEKPR2 created, with 28778049 rows and 14 columns.
1396 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 1:54.66
cpu time 1:41.68
NOTE: Remote submit to SESKUX01 complete.
通過使用rsubmit'的'&'endrsubmit'看來你是submiting查詢到遠程服務器SAS - 如何正在檢查輸出數據集'wpffasdekpr2'?您是否正在使用'PROC DOWNLOAD'下載到本地SAS會話?是否有可能你真的看到了'wpffasdekpr2'的陳舊副本? SAS組中的SQL組將以與其他數據庫中幾乎相同的方式工作,除了一些怪癖之外呢?讓我們暫時離開那些人。 – 2014-02-13 15:35:01
如果你可以發佈日誌,它會有幫助。 – 2014-02-13 15:39:52
我確定它不是陳舊的,因爲該表在查詢之前不存在。使用SAS中的內置查看器查看它。 – DavveK