sales@scantechintl.com
Registered User.
- Local time
- Today, 08:25
- Joined
- Oct 31, 2000
- Messages
- 24
Hello,
My problem is that somehow the PK of my [Orders] table got turned off allowing records with duplicate IDs. To get rid of the duplicates, I did the following:
1. create a new, test database.
2. copy the [Orders] table to it.
3. create a new field, [Delete] in the [Orders] table
4. write a query to find duplicate orders and make a new table[$Dup_Orders] with just the [IDOrder] field in it.
5. write a query , linking the [$Dup-Orders] table to the [Orders] table via [IDOrder]. Here’s the SQL of that query:
SELECT DISTINCTROW [$Dup_Orders].[IdOrder Field], Orders.DeleteDup
FROM [$Dup_Orders] INNER JOIN Orders ON [$Dup_Orders].[IdOrder Field] = Orders.IdOrder;
With that query, I would like to go through the table, flag the records to delete, and then write a query deleting those records.
The problem is that Access does not allow the [Orders] table to be modified.
The database is completely independent with only an imported [Orders] table and a temp table created from a query.
What am I doing wrong?
Regards,
John
My problem is that somehow the PK of my [Orders] table got turned off allowing records with duplicate IDs. To get rid of the duplicates, I did the following:
1. create a new, test database.
2. copy the [Orders] table to it.
3. create a new field, [Delete] in the [Orders] table
4. write a query to find duplicate orders and make a new table[$Dup_Orders] with just the [IDOrder] field in it.
5. write a query , linking the [$Dup-Orders] table to the [Orders] table via [IDOrder]. Here’s the SQL of that query:
SELECT DISTINCTROW [$Dup_Orders].[IdOrder Field], Orders.DeleteDup
FROM [$Dup_Orders] INNER JOIN Orders ON [$Dup_Orders].[IdOrder Field] = Orders.IdOrder;
With that query, I would like to go through the table, flag the records to delete, and then write a query deleting those records.
The problem is that Access does not allow the [Orders] table to be modified.
The database is completely independent with only an imported [Orders] table and a temp table created from a query.
What am I doing wrong?
Regards,
John