gpt4 book ai didi

sqlite - SQLite语法错误

转载 作者:行者123 更新时间:2023-12-03 15:19:01 41 4
gpt4 key购买 nike

我在下面做了一个sql查询。我也显示了一个异常。任何帮助表示赞赏。

查询:

INSERT OR REPLACE INTO CLAIMS (DATE ,TIME , ADDRESS , CITY, 
STATE , POSTAL , PHFNAME ,PHLNAME ,PHEMAIL ,PHPHONE ,AGENCY ,POLICY ,VEHICLENAME,
YEAR ,MAKE ,MODEL ,PLATELICENSE ,LSTATE ,VIN ,DRIVERNAME,DRFNAME ,DRLNAME ,
DRPHONE ,DREMAIL ,DRLICENSE) VALUES("Wednesday, May 4, 2011",
"10:39:10 PM EDT", "400 Chatham","Pune", "Penn", "45223", "John",
"Richard","jsmith@newyahoo.com","+1-11111111111",
"Three Rivers Insurance","(null)", "(null)", "(null)",
"(null)", "(null)","(null)", "(null)", "(null)","(null)",
"(null)", "(null)","(null)", "(null)","(null)") WHERE DATE LIKE
'Wednesday, May 4,%' AND TIME = '10:39:10 PM EDT'


错误:

SQLiteManager: Likely SQL syntax error:


[ near "WHERE": syntax error ]
Exception Name: NS_ERROR_FAILURE
Exception Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]

最佳答案

INSERT OR REPLACE不支持WHERE子句,请参见SQLite Insert doc。您可以在WHERE语句中使用UPDATE子句,请参见SQLite Insert doc

如果您可以在这里告诉我们您想要什么,可以为您提供帮助吗?

关于sqlite - SQLite语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5892314/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com