SQL缺少运算符错误

时间:2013-02-11 01:11:27

标签: sql excel odbc

下面的SQL行有什么问题

相关行:

SELECT * 
  FROM glossary.csv 
 WHERE source NOT IN ('AIS','AIP','ICAO','WATOG','ICAO/AIP') 
  AND NOT LIKE('CASR%')"

错误:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Text Driver] Syntax error (missing operator) in query expression 'source NOT IN ('AIS','AIP','ICAO','WATOG','ICAO/AIP') AND NOT LIKE('CASR%')'.

/junk/glossary.asp, line 20

1 个答案:

答案 0 :(得分:6)

你错过了where子句第二部分中的列名:

"SELECT * FROM glossary.csv 
 WHERE source NOT IN ('AIS','AIP','ICAO','WATOG','ICAO/AIP') 
 AND source  NOT LIKE 'CASR%'"