SAS 到 Oracle ODBC - 将 SAS 表传递到数据库
任何人都可以建议将表从 SAS 库传递到 Oracle 数据库的语法吗?
下面的示例代码(尽管显然不能以这种方式引用到 WORK 库的连接)
PROC SQL noprint;
connect to ODBC as X (dsn='ALIAS' uid='USER1' pwd='passwd' quote_char='');
exec (CREATE TABLE Test AS
SELECT * from WORK.MY_SAS_TABLE
)by X;
disconnect from X;
quit;
提出了类似的问题 此处 但似乎与 SQLSERVER 连接而不是 oracle 相关。
Can anyone please advise the syntax for passing a table FROM a SAS library INTO an oracle database?
example code below (although obviously the connection to the WORK library cannot be referenced in this way)
PROC SQL noprint;
connect to ODBC as X (dsn='ALIAS' uid='USER1' pwd='passwd' quote_char='');
exec (CREATE TABLE Test AS
SELECT * from WORK.MY_SAS_TABLE
)by X;
disconnect from X;
quit;
A similar question was asked here but seems to relate to a SQLSERVER connection rather than oracle..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 ODBC libname 引擎或 Oracle libname 引擎设置一个 libref 以指向您的 Oracle 数据库(如果您安装了正确的许可证和软件,速度会更快):
如果 Oracle 中已存在具有正确列的空表,你可以使用:
如果表不存在,你可以使用数据步骤:
Set up a libref to point to your Oracle database, either using the ODBC libname engine or the Oracle libname engine (which will be faster if you have the right licence and software installed):
If an empty table with the right columns already exists in Oracle, you can use:
If the table doesn't exist, you can use a data step:
我有点生疏,但是如果你将数据库设置为 libref 会怎么样?
像这样的东西:
I'm a bit rusty, but what if you set up your database as a libref?
Something like: