By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

How to insert new records from one table to another table

P: 9
Hi there,

How do I insert new records from a dbo table to another table?
This is what I have:

1 dbo_company
1 Member (table)

I made a query in dbo_company with the criteria I only want to retrieve out new records from "ceo_email" and "contact_email" column after e.g 25.July.07

Thereafter I want to insert these new records into the Member table with a single "Email" column only.

Can anyone of you able to assist me on that? Thanks!
Jul 25 '07 #1
Share this Question
Share on Google+
4 Replies

P: 9
Hi people,

I tried this but don't think I am doing the right way. Any people can advise? :)

SELECT dbo_company.ceo_email, dbo_company.contact_email, dbo_company.mem_type, dbo_company.date_created, Members.Email
FROM dbo_company, Members
WHERE (((dbo_company.mem_type)<>"Non-Member") AND ((dbo_company.date_created)>#7/25/2007#))
INSERT INTO Members.Email;
Jul 25 '07 #2

Expert Mod 10K+
P: 12,366
INSERT INTO comes first.
Jul 25 '07 #3

P: 9
Thanks so much for your guidance. That is useful and I manage to get it work out.

In case some of you may need it. This is the query I used in

INSERT INTO NonMembers ( Email )
SELECT dbo_company.contact_email
FROM dbo_company
WHERE (((dbo_company.mem_type)="Non-Member") AND ((dbo_company.date_created)>#7/25/2007#));
Jul 30 '07 #4

Expert Mod 10K+
P: 12,366
Not a problem, good luck.
Jul 30 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.