#1052 - Column 'date' in field list is ambiguous

689 Views Asked by At
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

1

There are 1 best solutions below

1
On BEST ANSWER

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';