SQL Statement Insert Into

T

Troy

I need to append data from one table1 to table2 using the field in table3 as
the criteria. This field in question is 'account number'. How can I write a
sql statement to accomplish this?
 
J

John W. Vinson

I need to append data from one table1 to table2 using the field in table3 as
the criteria. This field in question is 'account number'. How can I write a
sql statement to accomplish this?

I would GUESS that you would join Table1 to Table3 on [account number], and
base your append query on this - but your post is sufficiently vague that this
is just speculation. What's in the tables? How are they related? Do you want
to append all records in table1 which have a match in table3 or only a subset?
 
T

Troy

Table2 was a table made from Table1 from a make a table query so the fields
are the same. The criteria I would like to use is a list of account numbers
from Table3. The field has the same name 'account number' as the other 2
tables.

I hope I was clearer today. I made my first post at night after a long day!



John W. Vinson said:
I need to append data from one table1 to table2 using the field in table3 as
the criteria. This field in question is 'account number'. How can I write a
sql statement to accomplish this?

I would GUESS that you would join Table1 to Table3 on [account number], and
base your append query on this - but your post is sufficiently vague that this
is just speculation. What's in the tables? How are they related? Do you want
to append all records in table1 which have a match in table3 or only a subset?
 
J

John W. Vinson

Table2 was a table made from Table1 from a make a table query so the fields
are the same. The criteria I would like to use is a list of account numbers
from Table3. The field has the same name 'account number' as the other 2
tables.

I hope I was clearer today. I made my first post at night after a long day!

Well, I'm still confused. It sounds like Table2 contains the same records as
Table1 (which is redundant and bad design), and you want to add records
from... Table1. Wouldn't they already be there!?

That said, you can create a Query joining Table1 to Table3 by Account Number.
This query will contain all records in Table1 which have a matching account
number in Table3. You can then change the query into an Append query,
specifying Table2 as the target.

The entire process smells very fishy to me though!!!
 
G

Gina Whipp

Troy,

I too am confused... pehrpas you could outline what Table 1 thru 3 is and
their prospective fields along with what you are tyring to track/accomplish
with this database.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Troy said:
Table2 was a table made from Table1 from a make a table query so the
fields
are the same. The criteria I would like to use is a list of account
numbers
from Table3. The field has the same name 'account number' as the other 2
tables.

I hope I was clearer today. I made my first post at night after a long
day!



John W. Vinson said:
I need to append data from one table1 to table2 using the field in
table3 as
the criteria. This field in question is 'account number'. How can I
write a
sql statement to accomplish this?

I would GUESS that you would join Table1 to Table3 on [account number],
and
base your append query on this - but your post is sufficiently vague that
this
is just speculation. What's in the tables? How are they related? Do you
want
to append all records in table1 which have a match in table3 or only a
subset?
 

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