Command Other Than Append

Drunkenneo

Registered User.
Local time
Tomorrow, 05:18
Joined
Jun 4, 2013
Messages
192
We know when executing append query in a table if the query executed twice, then duplicate data get inserted,

Is there any other best solution to avoid such cases?
 
1) To use indexes in order to not allow duplicates (the best I know)
2) To count records with sensible fields before running the update query
 
If the data is coming from another table then use a query with an OUTER JOIN from the source table and the target table. An Is Null condition on a key field in the target table will prevent any existing records being repeated.
 
If the data is coming from another table then use a query with an OUTER JOIN from the source table and the target table. An Is Null condition on a key field in the target table will prevent any existing records being repeated.

I prefer what Galaxiom suggested, It appears to be excessive to create an index just so that you can satisfy just one query.
 
An Insert can also be simply adding a single record from a piece of constructed sql reading its values from a recordset or form.

In this case we would test for the presence of an existing record in the table. A DLookup is one way to do that.
 

Users who are viewing this thread

Back
Top Bottom