我建立SQL查詢在VBA,下面返回錯誤:運行時錯誤「-2147217900(80040E14)」錯誤的語法時才(缺少操作室),在SQL查詢表達式在VBA
stSQLstring = "SELECT * FROM [" & sheetName & "$]
WHERE [" & headerName & "] in (" & stNodes & ");"
調試。打印stSQLstring給出:
SELECT * FROM [sheetName$]
WHERE [headerName] in ('3','4','5','6','16','45','64','65','67','71','76','79','80','86','89','103','115','116','124','142','145','160');
我然後使用ACE.OLEDB查詢外部工作簿(我認爲這部分是不錯,因爲與其它SQL語句的工作,只是沒有這一項)。
我會很感激你的幫助!
而錯誤是...? – Siyual