在公司EXCEL VBA SQL語法如下可逹成:
mSqlCls = "SELECT SERSNO,BYPARTNO,項次號碼 FROM INVITEM WHERE SERSNO='AT 03012345678' AND MSGCODE='5105S'"
但小弟在家執行上述語法會出現下列問題
ERR NUMBER:-2147217900
ERR DESCRIPTION:
[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt-log]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 '項次號碼 FROM INVITEM WHERE SERSNO='AT 0312345678' AND MSGCODE='5105S'' at line 1
但如果將欄位"項次號碼"移除並執行卻可成功
mSqlCls = "SELECT SERSNO,BYPARTNO FROM INVITEM WHERE SERSNO='AA 0312345678' AND MSGCODE='5105S'"