i have table called "YE"
two fields; reference (int) and data (string)
there is no primary key
i need to make a copy of the table called "YEorig" and remove the duplicates from "YE"
To make a copy of the table i used this code:
then i made a delete query to empty the "YE" table
then i used an append query to copy the non duplicates from "YEorig" to "YE"
here's the problem. . .
it appends all the records coz there is no primary key, how can i (using code when i create the table) make reference the primary key in the "YEorig" table?
NB: i must not make a primary key in the "YE" table
can you help with this one eh?
thanx Faxof
two fields; reference (int) and data (string)
there is no primary key
i need to make a copy of the table called "YEorig" and remove the duplicates from "YE"
To make a copy of the table i used this code:
Code:
CurrentProject.Connection.Execute "SELECT YE.* INTO YEorig FROM YETest"
then i made a delete query to empty the "YE" table
then i used an append query to copy the non duplicates from "YEorig" to "YE"
here's the problem. . .
it appends all the records coz there is no primary key, how can i (using code when i create the table) make reference the primary key in the "YEorig" table?
NB: i must not make a primary key in the "YE" table
can you help with this one eh?
thanx Faxof