
How to insert data from un-indexed tabel to indexed table
If the target table has a unique index on the field(s) that determine
repetition, you can simply execute a statement to copy all the records from
the source to the target:
SQL = "INSERT INTO TargetTable SELECT * FROM SourceTable;"
db.Execute SQL
The insert will fail on the duplicate records but succeed on the rest.
Quote:
> Hi,
> I have two tables in MS Access 97, one table is indexed, another one is an
> un-indexed table which has some repeating records.Now I want to transfer
> data from the un-indexed table to the indexed table (if the data is
> repeated, I will only transfer the first record from the repeating group).
> Anybody knows how to do it in VB6?
> Thanks in advance,
> Henry