You can do this in Access. 

right click on table 2, click on copy.
now right click  anywhere within the table tab. then click on paste.
type in the name of your table1. and select append data to existing table.

if you set the email field in table1 as primary key. this will take of of
the duplicate emails for you.






-----Original Message-----
From: CF- Student [mailto:mail@;extralligence.com]
Sent: Friday, October 18, 2002 8:20 AM
To: CF-Talk
Subject: Inserting Unique Values


Hi Everyone,


Need help with this query.

I am trying to add data from one table to another.(Same DB)

Table 1 contains the following fields:

id, emailaddress, company, details.

Table 2 contains

id, emailaddress, company.

emailaddress field is the primary key in both the tables.

Table 1 has 5000 rows of records.
Table 2 has 9000.


I want to add the email addresses from  Table 2 TO the email addresses in
Table 1.

The problem is that there are some records (at least 2000) in Table 2 which
are already present in Table1.
I want to add only those rows from  Table 2 to Table 1 which are not present
in Table 1. That is the email addresses should be unique. I do not want
Table 1 to have duplicate records.

Can someone help me with the CF syntax please. I am absolutely new to
DataBases and CF.

I am using Access 2000 and CF5.

Many Thanks in Advance,

Ben
(CF-STUDENT)






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to