2011-11-16 110 views
1

我正在將數據從MySQL導入到PowerPivot。我擁有所有相關的驅動程序。當我嘗試導入的PowerPivot我收到以下錯誤:MySQL ODBC導入失敗

當我從表的列表中進行選擇:

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

回答

0

就在今天我遇到了這個問題。看起來,Excel無法導入一個表,當它擊中某個字段中的「可分割」時。在我的情況下,字段類型是文本,所以也許一些字段只包含很多數據。然後整個導入失敗。

所以我所做的是選擇其他選項,使用SQL查詢導入。

select field_a, field_b from the_table 

在那裏,你只是省略了導致問題的列,在你的情況下'自定義'。

如果你需要這個專欄,那麼你可能有一個啓發式的看看它的內容找到潛在的麻煩製造者。

0

一更好的方法可能是安裝內置mysql的電源查詢(然後可以通過電源支持)。