2011年6月18日

Q4: 上傳Excel檔出現錯誤訊息

SQL 語法:
INSERT INTO `ODS_DB`.`工作表1` (`Stocksn`, `StockID`, `Stockyear`, `BS01`, `BS02`, `BS03`, `BS04`, `BS05`, `BS06`, `BS07`, `BS08`) VALUES (1, 1101, 2009, 16426107, 11735320, 128828473, 204741262, 50754424, 103627452, 101113810, 24.03), (2, 1101, 2008, 13033535, 7488908, 125049038, 186867735, 39174857, 96618938, 90248797, 21.88), (3, 1101, 2007, 9817626, 2528790, 115474752, 191914424, 30939928, 89025892, 102888532, 25.5), (4, 1101, 2006, 8115728, 2115643, 101516511, 161349504, 19604330, 83831405, 77518099, 21.34), (5, 1101, 2005, 10873922, 12878363, 103112732, 156448622, 23901768, 90294753, 66153869, 18.86), (6, 1101, 2004, 3978093, 22876180, 95468947, 149628664, 17038240, 87973018, 61655646, 18.54), (7, 1101, 2003, 4818795, 25616276, 97123566, 151274348, 20257107, 93010703, 58263645, 18.04), (8, 1101, 2002, 4985267, 29761829, 99266648, 159636533, 29338010, 102013920, 57622613, 18.09), (9, 1101, 2001, 1912095, 30134734, 100333396, 152903380, 16941490, 100869417, 52033963, 16.[...]
MySQL 傳回:
#1054 - Unknown column 'Stocksn' in 'field list'
========================================
by Stephen
(1) 因為該檔案是用Big5碼, 而MySQL預設是用utf8
(2) 改用big5就可以上傳
(3) 但遇到另一個問題, 是檔案太大 (70M)...雖然已經開了100M, 但仍無法上傳成功.
(4) 所以Q1還會有part 2

沒有留言: