gpt4 book ai didi

MYSQL 更新查询语法错误 28-10-2016a

转载 作者:行者123 更新时间:2023-11-29 20:07:22 25 4
gpt4 key购买 nike

UPDATE DFEntryValues
SET DFEntryValues.DFFieldvalue = NOW()
FROM DFEntryValues
JOIN DFEntries ON DFEntryValues.DFEntryID = DFEntries.DFEntryID
JOIN DynamicFormStructures ON DFEntries.DynamicFormStructureID = DynamicFormStructures.DynamicFormStructureID
JOIN Projects ON DynamicFormStructures.ProjectID = Projects.ProjectId
JOIN Clients ON Projects.ClientID = Clients.ClientID
JOIN DFFieldDefinition ON DFEntryValues.DFFieldDefinitionID = DFFieldDefinition.DFFieldDefinitionID
WHERE Clients.ClientID = '26' AND DFFieldDefinition.label = 'Geboortedatum';

我收到以下错误:

错误代码:1064

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 'WHERE Clients.ClientID = '26' AND DFFieldDefinition.label = 'Geboortedatum' SET' at line 12

有人可以指出我这个查询有什么问题吗?

亲切的问候!!

最佳答案

您似乎没有使用正确的格式。希望这会有所帮助。

UPDATE DFEntryValues JOIN DFEntries ON DFEntryValues.DFEntryID = DFEntries.DFEntryID
JOIN DynamicFormStructures ON DFEntries.DynamicFormStructureID = DynamicFormStructures.DynamicFormStructureID
JOIN Projects ON DynamicFormStructures.ProjectID = Projects.ProjectId
JOIN Clients ON Projects.ClientID = Clients.ClientID
JOIN DFFieldDefinition ON DFEntryValues.DFFieldDefinitionID = DFFieldDefinition.DFFieldDefinitionID
SET DFEntryValues.DFFieldvalue = NOW()
WHERE Clients.ClientID = '26' AND DFFieldDefinition.label = 'Geboortedatum';

关于MYSQL 更新查询语法错误 28-10-2016a,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40305907/

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