K
kikeman
Hi, I have been trying to hard to delete some duplicates and I cannot,
I have two tables:
1.-nproyecto(does not have primary-key, error from last developer)
2.-Distict (query table)
The first has duplicated projects, each project has a "Nproy" that is a text
and that "Nproy" column has duplicates the other fields are the same.
the "Distict", I have managed to get rid of duplicates with the following
SQL command:
SELECT First(nproyecto.Nproy) AS FirstOfNproy, nproyecto.Nproy,
nproyecto.Nofe, nproyecto.desc
FROM nproyecto
GROUP BY nproyecto.Nproy, nproyecto.Nofe, nproyecto.desc;
But now that I want to create another Query table to delete the duplicates
it shows nothing
From the query design I have join from the field "Nproy" from "nproyecto"
table to "Nproy" from "Distict", and I used the following command just to
show the duplicates but it does not work:
DELETE nproyecto.*, nproyecto.Nproy
FROM nproyecto INNER JOIN [nproyecto - Distinct Records] AS [Distinct] ON
nproyecto.Nproy = Distinct.Nproy
WHERE (((nproyecto.Nproy)<>[Distinct].[FirstOfNproy]));
Any suggestions?
Thanks,
I have two tables:
1.-nproyecto(does not have primary-key, error from last developer)
2.-Distict (query table)
The first has duplicated projects, each project has a "Nproy" that is a text
and that "Nproy" column has duplicates the other fields are the same.
the "Distict", I have managed to get rid of duplicates with the following
SQL command:
SELECT First(nproyecto.Nproy) AS FirstOfNproy, nproyecto.Nproy,
nproyecto.Nofe, nproyecto.desc
FROM nproyecto
GROUP BY nproyecto.Nproy, nproyecto.Nofe, nproyecto.desc;
But now that I want to create another Query table to delete the duplicates
it shows nothing
From the query design I have join from the field "Nproy" from "nproyecto"
table to "Nproy" from "Distict", and I used the following command just to
show the duplicates but it does not work:
DELETE nproyecto.*, nproyecto.Nproy
FROM nproyecto INNER JOIN [nproyecto - Distinct Records] AS [Distinct] ON
nproyecto.Nproy = Distinct.Nproy
WHERE (((nproyecto.Nproy)<>[Distinct].[FirstOfNproy]));
Any suggestions?
Thanks,