1
I’m trying to delete the record from the table but returns me this error message, what I’m doing wrong ? I tested in various ways and I always fall in this message
Error Code: 1093 You can’t specify target table’d' for update in FROM clause
DELETE d FROM tbl_atividades AS d WHERE codigo NOT IN (
SELECT
a.codigo
FROM tbl_atividades AS a
INNER JOIN tbl_atividades_por_dep AS b
ON a.tipo_atividade = b.atividade
AND a.departamento = b.departamento
AND a.tributacao = b.tributacao
) AND d.status <> 'CONCLUIDO'
AND d.extra_urgente_comum <> 'E'