[英]SQL syntax error: near “.”?
When I try to run this query: 当我尝试运行此查询时:
UPDATE Line_Master
SET Line_Master.line_count = t2.task_count FROM (SELECT COUNT (am.line_id) AS task_count, lm.lineId
FROM Assets_Master am,Line_Master lm,Section_Master sm,Task_Point_Master tpm,Task_Master TM
WHERE (lm.line_id = am.line_id)
AND (am.asset_id = sm.asset_id)
AND (sm.section_id = tpm.section_id)
AND (tm.task_point_id = tpm.task_point_id)
GROUP BY lm.line_id) t2
WHERE Line_Master.line_id = t2.lineId
I get this error: 我收到此错误:
Internal Error syntax error: near ".":Syntax error 内部错误语法错误:“。”附近:语法错误
I don't know what you are trying to do, but this way the Syntax is correct. 我不知道您要做什么,但是这样语法是正确的。 But i don't know if it shows your desired result and if sqlite supports this...
但是我不知道它是否显示您想要的结果以及sqlite是否支持此...
UPDATE Line_Master
SET Line_Master.line_count = (SELECT t2.task_count FROM (SELECT COUNT (am.line_id) AS task_count, lm.lineId
FROM Assets_Master am,Line_Master lm,Section_Master sm,Task_Point_Master tpm,Task_Master TM
WHERE (lm.line_id = am.line_id)
AND (am.asset_id = sm.asset_id)
AND (sm.section_id = tpm.section_id)
AND (tm.task_point_id = tpm.task_point_id)
GROUP BY lm.line_id) t2
WHERE Line_Master.line_id = t2.lineId)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.