Search one table to copy and paste select data to another table

S

Sarah

I have two tables -- Companies and People. I want to execute a command that
will search the Companies table in the fields "Last Name" and "First Name"
and see if the people in the Companies table can be found in the People
table. If they are found, I don't want anything else to happen. But if they
are not found, I want to create new People records in the People table
including the information "Last Name," "First Name," "Firm," "Email," and
"Function" fields pulled from the Companies table.

Any help would be appreciated!
 
J

John W. Vinson

I have two tables -- Companies and People. I want to execute a command that
will search the Companies table in the fields "Last Name" and "First Name"
and see if the people in the Companies table can be found in the People
table. If they are found, I don't want anything else to happen. But if they
are not found, I want to create new People records in the People table
including the information "Last Name," "First Name," "Firm," "Email," and
"Function" fields pulled from the Companies table.

Any help would be appreciated!

Sounds like you have a redundant data structure! Why are you storing *the
same* information in two different tables? What do you want to happen if the
Companies table has "Bill Johnson" and the People table has "William Johnson"?

And what if the Companies table has a record for "David Smith", the tall blond
CEO, and the People table has a record for "David Smith", the mechanic at the
garage of a different company? Is that a valid match?

I fear your data design is incorrect. Could you explain?
 

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