【发布时间】:2018-10-23 19:44:00
【问题描述】:
使用 SAS V 9.xxx。
如何将数据从通用 WORK 库中的表传递到 Netezza 中的表。
现在我可以从 Netezza 中取出数据并存储在 WORK 库中,例如:
/* using “connect to” */
proc sql;
connect to netezza (&us_mkt.);
execute (
drop table &tempdir..SALES_TBL_TST1;
create table &tempdir..SALES_TBL_TST1
as
select * from &tempdir..SALES_TBL;
/*select * from &tempdir..SALES_TBL */
) by netezza;
disconnect from netezza;
quit;
/* using “connect using” */
proc sql;
connect using ROLAP;
drop table WORK.SALES_TBL_TST2;
create table WORK.SALES_TBL_TST2 AS
select * from connection to ROLAP
(select * from USER_ROLAP.SALES_TBL);
insert into WORK.SALES_TBL_TST2
select * from connection to ROLAP
(select * from &tempdir..SALES_TBL);
quit;
但是,如果我想将 WORK 库中的数据放回 Netezza 怎么办。比如:
insert into &tempdir..SALES_TBL_TST1
select * from WORK.SALES_TBL_TST2;
有没有办法做到这一点?
提前致谢!
【问题讨论】: