3

我想在 Data Hub 中选择一个活动分区。通常我会使用以下语句:

INVANTIVE> use 1552839
2>
Exclamation itgendhb077: Error in Invantive Data Hub.
Database '1552839' does not exist. Make sure that the name is entered correctly.

这给出了一个错误。我注意到当我为我的精确在线连接使用别名时,它确实如此工作:

INVANTIVE> use 1552839@eol
2>
itgendhb018: 0 Rows Affected (111 ms)

但我想做以下事情,从 SQL 表中选择我想要的部门,但这是行不通的:

use select division_code from dc.rs.selected_admins@sql

另一种方法也不起作用:

INVANTIVE> use select code from systemdivisions@eol sd inner join dc.rs.selected_admins@sql sa on sd.code = sa.division_code
2>
Exclamation itgendhb077: Error in Invantive Data Hub.
Database '1552839' does not exist. Make sure that the name is entered correctly.
4

1 回答 1

2

当未指定别名时,按照“排序顺序”处理第一个连接的数据容器。鉴于错误消息的类型,这可能是 SQL Server 数据库。

假设您正在寻找一种方法来指定特定数据容器中的分区,最好的方法是使用:

use select code partitioncode, 'eol' datacontaineralias from ...

这与获取以下结果相同:

select 'use ' || lst from ( select listagg(code || '@' || eol') lst from ... )

并执行那个。

当然,当您连接多个数据容器(如 Exact Online Belgium、荷兰和 Loket 和 Nmbrs)时,您可以在一份use声明中提供所有数据。

于 2017-09-12T09:51:20.470 回答