我的 T-SQL 查询中的WHERE
条件没有返回任何行,从 SQL 2019 polybase 到 .XLSX 文件
这是我创建 Polybase 的代码:
create master key encryption by password = 'Polybase2CSV';
create external data source myODBCxlsx with
(
LOCATION = 'odbc://localhost',
CONNECTION_OPTIONS = 'Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}; DBQ=F:\PolybaseSourceData\CustomerData.xlsx'
);
create external table CustomerData(
CUSTOMERID FLOAT(53),
CUSTOMERNAME Nvarchar(255),
DEPARTMENT Nvarchar(255)
) with (
LOCATION='[sheet1$]',
DATA_SOURCE=myODBCxlsx
);
此查询有效:
select * from customerData
但是,这不会:
select * from customerData where customername = 'Steve'
尽管有一位名叫 Steve 的客户,但该查询不返回任何行。