【问题标题】:This sql statement is not a query Import Wizard此 sql 语句不是查询导入向导
【发布时间】:2017-09-29 20:45:05
【问题描述】:

我正在尝试将数据从 excel 文件导入到我的一个表中,因此我在管理工作室中使用 SQL Server 导入和导出向导并提供源查询。当我在输入以下查询后单击解析时,我得到 This sql statement is not a query。

select 
    u.UserID, m.IMManagementPlatformID, s.Username
from 
    ([Sheet1$] s 
inner join 
    dbo.wmcTBLUsers u on u.Firstname = s.Firstname 
                      and u.Lastname = s.Lastname) 
inner join 
    IMManagementPlatform m on m.IMManagementPlatformName = s.IMManagementPlatformName 
where 
    u.IsActive = 1 
    and u.Firstname <> 'First' 
    and u.Lastname <> 'Last'

【问题讨论】:

    标签: sql-server-2012 ssms


    【解决方案1】:

    此错误来自 Microsoft Office Access 数据库引擎。

    它解析只访问 Excel 文件而不是 SQL Server 数据库的查询, 因此您只能在查询中使用其他 Excel 工作表

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多