G
Guest
Hi. I have a query that check unmatched record between two tables.
My query result are 11 records, i would like to dele those records but it
returns me an error:
This is the error: Specif the table containing the records you want to delete.
This is my sql query:
DELETE [8_tbl_Plano_Producao_Linhas_Reais].ID_PPR,
[8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec,
[8_tbl_Plano_Producao_Linhas_Reais].Quantidade_Disponibilizada,
[9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima
FROM 8_tbl_Plano_Producao_Linhas_Reais LEFT JOIN 9_tbl_PPR_Linhas_Temp ON
([8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec =
[9_tbl_PPR_Linhas_Temp].COD_Plano_Producao_Cabec) AND
([8_tbl_Plano_Producao_Linhas_Reais].COD_Externo_Materia_Prima =
[9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima) AND
([8_tbl_Plano_Producao_Linhas_Reais].Lote = [9_tbl_PPR_Linhas_Temp].Lote)
WHERE ((([8_tbl_Plano_Producao_Linhas_Reais].ID_PPR) Like "*") AND
(([8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec)=[forms]![17_form_Planos_Producao_Linhas]![id])
AND (([8_tbl_Plano_Producao_Linhas_Reais].Quantidade_Disponibilizada) Is
Null) AND (([9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima) Is Null)) OR
((([8_tbl_Plano_Producao_Linhas_Reais].ID_PPR) Like "*") AND
(([8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec)=[forms]![17_form_Planos_Producao_Linhas]![id])
AND (([8_tbl_Plano_Producao_Linhas_Reais].Quantidade_Disponibilizada)=0) AND
(([9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima) Is Null));
Regards,
Marco
My query result are 11 records, i would like to dele those records but it
returns me an error:
This is the error: Specif the table containing the records you want to delete.
This is my sql query:
DELETE [8_tbl_Plano_Producao_Linhas_Reais].ID_PPR,
[8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec,
[8_tbl_Plano_Producao_Linhas_Reais].Quantidade_Disponibilizada,
[9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima
FROM 8_tbl_Plano_Producao_Linhas_Reais LEFT JOIN 9_tbl_PPR_Linhas_Temp ON
([8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec =
[9_tbl_PPR_Linhas_Temp].COD_Plano_Producao_Cabec) AND
([8_tbl_Plano_Producao_Linhas_Reais].COD_Externo_Materia_Prima =
[9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima) AND
([8_tbl_Plano_Producao_Linhas_Reais].Lote = [9_tbl_PPR_Linhas_Temp].Lote)
WHERE ((([8_tbl_Plano_Producao_Linhas_Reais].ID_PPR) Like "*") AND
(([8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec)=[forms]![17_form_Planos_Producao_Linhas]![id])
AND (([8_tbl_Plano_Producao_Linhas_Reais].Quantidade_Disponibilizada) Is
Null) AND (([9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima) Is Null)) OR
((([8_tbl_Plano_Producao_Linhas_Reais].ID_PPR) Like "*") AND
(([8_tbl_Plano_Producao_Linhas_Reais].COD_Plano_Producao_Cabec)=[forms]![17_form_Planos_Producao_Linhas]![id])
AND (([8_tbl_Plano_Producao_Linhas_Reais].Quantidade_Disponibilizada)=0) AND
(([9_tbl_PPR_Linhas_Temp].COD_Externo_Materia_Prima) Is Null));
Regards,
Marco