【问题标题】:Vertica :Creating a viewVertica:创建视图
【发布时间】:2020-05-20 15:26:42
【问题描述】:

我正在尝试在 Vertica 中创建一个用 SAS 编写的视图。

proc sql;
      connect to odbc as try
     (server='10.10.7.174' port=5433 user=dbadmin password=password );
     execute (create view  &schema..myview as 

     ( Select * from &schema..table_1
       union all 
       Select * from &schema..table_2
     ))by try ;

 disconnect from try;
quit;

问题是:因此它创建的是表而不是视图。

【问题讨论】:

  • 您的代码在 SAS 方面看起来是正确的。日志显示什么?如果您在 Vertica 中运行该确切代码会发生什么?

标签: sql view sas vertica


【解决方案1】:

当 SAS Explorer 显示 Contents of 'libname' 并且 libname 为远程时,DB 视图将显示为 Table 类型。

【讨论】:

  • 那么在DB中创建视图是不可能的?因为它不仅以表格的形式出现,而且具有相同的特征
  • 没这么说。 VERTICA 中的视图将(可能)显示为连接的 SAS 客户端(在 SAS Explorer 中)的表。您可以尝试以下 SAS SQL 语句:create table WORK.VERTICA_VIEWS as select * from connection to try (select * from VIEWS) 根据 Vertica 服务器获取 VIEW 列表。
猜你喜欢
  • 2021-12-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多