Re: Create a single-record append query without warnings on duplicates
- From: Rich P <rpng123@xxxxxxx>
- Date: Tue, 29 Apr 2008 10:55:35 -0500
Greetings,
Here is a sample for inserting records into a table that don't already
exist in that table using the "Not Exists" clause - this will prevent
inserting duplicate records:
Insert into tbl2 Select t1.* from tbl1 t1 Where Not exists (Select *
from tbl2 t2 Where t2.ID = t1.ID)
Rich
*** Sent via Developersdex http://www.developersdex.com ***
.
- References:
- Prev by Date: Union Query Help File Interpretation
- Next by Date: Re: Union Query Help File Interpretation
- Previous by thread: Create a single-record append query without warnings on duplicates
- Next by thread: Re: Rewritten UPDATE query - is it the same?
- Index(es):