I am trying to write a small query which will remove the duplicate

V

Vidya Sandela

I am trying to write a small query which will remove the duplicate entries in
my Access table.

This is what I'm trying to do...

SELECT DISTINCT * INTO TEMPTABLE FROM ORIGINALTABLE

DROP ORIGINALTABLE

SELECT * INTO ORIGINALTABLE FROM TEMPTABLE

DROP TEMPTABLE.

I get this error when I do that .

The Field is Too Small to Accept the Amount of Data you Attempted to Add

I just tried doing a select distinct * from originaltable I still get the
same error

Please advise.


Thanks
 
J

Jeanette Cunningham

Hi Vidya Sandela,
Make a copy of the original table as structure only and call it temp.
In the design view of temp, put a unique index on the field or fields where
you have duplicates in the original table.

Now create a query based on the original table and make into an append
query.
Run the query to append the records to temp.

Now you can rename the original table as Xoriginal and rename temp as
original table.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top