我有一個SAS本地表,我試圖在遠程DB2服務器上創建臨時表表。無論如何,除了在其他地方建立一個插入聲明並將其流式傳輸以外,還有其他的做法?從SAS表寫入DB2臨時表
libname temp db2 uid=blagh pwd=blagh dsn=blagh connection=global schema=Session;
Proc SQL;
Connect to db2 (user=blagh pw=blagh dsn=blagh connection=global);
Execute (
Declare Global Temporary Table Session.Test
(foo char(10))
On Commit Preserve Rows
Not Logged
) by db2;
Execute (Commit) by db2;
Insert Into Session.Test
Select Distinct A.foo From Work.fooSource A;
我已經嘗試了幾個這些主題的變化,每個變化導致錯誤。上面的代碼產生。
ERROR: Column foo could not be found in the table/view identified with the correlation name A.
ERROR: Unresolved reference to table/correlation name A.
刪除別名給我。
ERROR: INSERT statement does not permit correlation with the table being inserted into.
難道是表或列名的情況下DB2中的敏感性? – vasja