2013-02-11 88 views
0

有什麼不對下面的行SQLSQL缺少操作員錯誤

相關線路:

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 
+0

缺少「源」或其他列前值 「不喜歡( 'CASR5')應爲 」 SELECT * FROM glossary.csv WHERE源NOT IN( 'AIS', 'AIP', 'ICAO', 'WATOG','ICAO/AIP')和來源不相似('CASR%')「 – OldProgrammer 2013-02-11 01:14:27

回答

6

你在第二部分錯過了列名where子句:

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