简体   繁体   English

#1052-字段列表中的“日期”列不明确

[英]#1052 - Column 'date' in field list is ambiguous

update callingroute AS t1
INNER JOIN callingroute AS t2                
SET t1.day = (select date FROM (select dayname(date) from callingroute where status = 'OK')AS X) 
WHERE t1.calling_route_id IS NOT NULL;

// Any idea why i get these errors //知道我为什么会遇到这些错误

If anything the query should be shortened to 如果有任何查询应缩短为

update callingroute AS t1                
SET t1.day = dayname(date) 
WHERE t1.calling_route_id IS NOT NULL
  AND status = 'OK';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM