【问题标题】:MySQL ODBC Import FailMySQL ODBC 导入失败
【发布时间】:2011-11-16 15:17:32
【问题描述】:

我正在将数据从 MySQL 导入 PowerPivot。我有所有相关的驱动程序。当我尝试导入 PowerPivot 时,出现以下错误:

当我从表格列表中选择时:

Failed to retrieve data from companies. Reason: ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.58]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[companies].* FROM [companies]' at line 1

当我“编写一个经过验证的查询”时,我会收到:

The following system error occurred: Catastrophic failure A connection could not be made to the data source with the DataSourceID of 'dc746dc9-4aaa-4e03-b938-f84a128f5671', Name of 'Custom'. An error occurred while processing the 'Query' table. The operation has been cancelled.

但是,我可以很好地导入 Excel。如何修复 PowerPivot 导入?

【问题讨论】:

    标签: mysql excel mysqlimport powerpivot


    【解决方案1】:

    就在今天,我遇到了这个问题。当 Excel 在某个字段中遇到“难以消化”的内容时,它似乎无法导入表格。在我的情况下,字段类型是文本,所以可能某些字段只包含大量数据。然后整个导入失败。

    所以我所做的是选择另一个选项,使用 SQL 查询导入。

    select field_a, field_b from the_table
    

    您只需省略导致问题的列,在您的情况下为“自定义”。

    如果您需要这个专栏,那么您可以试探一下它的内容,以找出潜在的麻烦制造者。

    【讨论】:

      【解决方案2】:

      您的第一个问题是由于 microsoft (?) 将表名包含在方括号中

      http://www.datamensional.com/2011/09/how-to-use-mysql-and-microsoft-powerpivot-together-2/ 所以表格向导不起作用。回到 3.51.30 版本可能会使这项工作: http://www.joyofdata.de/blog/how-to-set-up-powerpivot-and-make-it-talk-to-mysql/

      所以正如你所说,你可以编写自己的查询......(假设你已经解决了第二个问题!)

      【讨论】:

        【解决方案3】:

        更好的方法可能是安装内置 mysql 的电源查询(然后可以馈送到电源支点)。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2015-12-04
          • 1970-01-01
          • 2010-12-26
          • 2014-10-29
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多