如何使用 SAS 从特定数据库获取 Teradata 表的列表?

发布于 2025-01-16 14:37:07 字数 238 浏览 1 评论 0原文

我正在尝试使用以下 proc sql 语句获取表:

proc sql;
    Select tablename from dbc.tables;
run;

我已经定义了所需的 teradata 和 SQL Server 位置。我收到的错误是“文件 dbc.tables 不存在”

如果我在 Teradata SQL 助手中运行查询,它会起作用。只是我无法使用 SAS 做同样的事情。

I am trying to get the tables using the following proc sql statement:

proc sql;
    Select tablename from dbc.tables;
run;

I have already defined the teradata and SQL server locations required. The error I get is "File dbc.tables does not exist"

If I run the query in Teradata SQL assistant, it works. Its just that I am unable to do the same using SAS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

记忆里有你的影子 2025-01-23 14:37:07

尝试使用dictionary.tables

proc sql;
    select memname
    from dictionary.tables
    where libname = 'YOUR LIBNAME HERE'
    ;
quit;

Try using dictionary.tables

proc sql;
    select memname
    from dictionary.tables
    where libname = 'YOUR LIBNAME HERE'
    ;
quit;
早茶月光 2025-01-23 14:37:07
proc datasets lib=<your library reference>;
run;

如果您不知道您的库引用,但您假设该库已分配,请尝试

proc sql;
select * from sasHelp.vlibnames;
quit;

如果这没有帮助,并且您正在使用企业指南,连接到元服务器,请单击服务器,您的服务器、Libraries 并确保设置了查看未分配库的按钮。

proc datasets lib=<your library reference>;
run;

If you don't know your library reference, but you assume the library is assigned, try

proc sql;
select * from sasHelp.vlibnames;
quit;

If that does not help and you are working in Enterprise Guide, connected to a metaserver, click on Servers, your server, Libraries and make sure the button to see non-assigned libraries is set.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文