0
select
    *
from
    OPENQUERY
    (
        [xxx], 'SELECT * FROM table'
    ) as S

我不明白为什么我会收到错误消息SQL command not properly ended

有什么建议么?

编辑#1:

我使用的数据库(xxx)是雪花数据库。

编辑#2:

此查询有效:

SELECT 
    S.[col_1]
    ,S.[col_2]
    ,*
FROM 
    OPENQUERY
    (
        [xxx], 'SELECT * FROM schema.table_a'
    ) as S
where
    S.[col_1] = 'whatever';

但我不明白为什么这个查询不:

SELECT 
    S.*
FROM 
    OPENQUERY
    (
        [xxx], 'SELECT * FROM schema.table_a'
    ) as S
where
    S.[col_1] = 'whatever';
4

0 回答 0