Importing no duplicate records from a table in another

G

giannis

I need an append query that imports all the
no duplicate records in a table from another one.

Suppose that Table1 is the target table with
the fields field1 and field2 and suppose that
Table2 is the sourse table with fields F1 and F2,
the query for all the records is :

INSERT INTO Table1 ( field1, field2 )
SELECT [Table2].[F1], [Table2].[F2]
FROM Table2

What is the query for all - no duplicate- records ?
(what must write in the WHERE ?)
 
A

Arvin Meyer

You can use an Aggregate Query (Group By) to get only unique records. You
can also use the Distinct predicate to return unique fields, or the
Distinctrow predicate (Access/Jet only) to return unique rows of data.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

giannis said:
I need an append query that imports all the
no duplicate records in a table from another one.

Suppose that Table1 is the target table with
the fields field1 and field2 and suppose that
Table2 is the sourse table with fields F1 and F2,
the query for all the records is :

INSERT INTO Table1 ( field1, field2 )
SELECT [Table2].[F1], [Table2].[F2]
FROM Table2

What is the query for all - no duplicate- records ?
(what must write in the WHERE ?)
 
G

giannis

Some example plese !!!!!

Arvin Meyer said:
You can use an Aggregate Query (Group By) to get only unique records. You
can also use the Distinct predicate to return unique fields, or the
Distinctrow predicate (Access/Jet only) to return unique rows of data.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

giannis said:
I need an append query that imports all the
no duplicate records in a table from another one.

Suppose that Table1 is the target table with
the fields field1 and field2 and suppose that
Table2 is the sourse table with fields F1 and F2,
the query for all the records is :

INSERT INTO Table1 ( field1, field2 )
SELECT [Table2].[F1], [Table2].[F2]
FROM Table2

What is the query for all - no duplicate- records ?
(what must write in the WHERE ?)
 

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