MySQL ODBC导入失败

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

当我从表中select:

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

当我“写一个查询”已validation我收到:

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导入?

就在今天我面对这个问题。 看来,Excel无法导入一个表,当它击中一个字段中的“可分解”的东西。 在我的情况下,字段types是文本,所以也许一些字段只是包含了很多数据。 然后整个导入失败。

所以我所做的是select其他选项,使用SQL查询进行导入。

 select field_a, field_b from the_table 

在那里,你只是留下了导致问题的专栏,在你的情况下,“自定义”。

如果你需要这个专栏,那么你可能会有一个启发式的看看它的内容,find潜在的麻烦制造者。

你的第一个问题是由于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/

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

一个更好的方法可能是安装内置mysql的电源查询(然后可以通过电源支持)。