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

trying to copy a table to another with a second table as reference

P: n/a
1 need to copy the data in one table into another...but its from another database.
tables are demographics and testdata

database1 database2
demographics
personid personid same in both databases
eval eval same in both databases
autoid autoid different

testdata
autoid autoid
data1 data1
80 variables from database1 to database2
the autoid has me messed up
demographics1 demographics2
personid 1 personid 1
eval 1 eval 1
autoid 1 autoid 12

testdata1 testdata2
autoid 1 autoid 12
data1 4 data1
data2 6 data2
data3 9 data3
data4 3 data4

is there a way to copy the data in a quary ?
I put the 4 tables in a new database but I kept getting messed data.
thanks for any help
I thought this should be easy...maybe I made it tooooo hard

Jerry

Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Why don't you use the Import wizard and then create an Append Query to append
the data to the new table?

File, Import, select the db, import the table(s). Go to queries, select query,
select the table, go to type query and select append, select the table and
fields and append. If the data in both tables is the same it should work
flawlessly.

HTH

Michael
Nov 12 '05 #2

P: n/a
the problem is I can import and append but
the autoid numbers are different in both databases
they created personid and eval period
in both databases ....this made the 2 databases the same...or almost
the autoid in database1 is different than the autoid in database2
so I have 2 tables that are linked to the demographics table by an autoid
and they are not the same.
personid and eval same but not the autoid
demographics
personid SAME
eval SAME

datatabes
autoid DIFFERENT

so
personid 1 eval 1 autoid 1 database1
personid 1 eval 1 autoid 100 database2

how do I copy the autoid1 to the new table with autoid 100
On 01 May 2004 10:30:39 GMT, lu*************@aol.com (Lumpierbritches) wrote:
Why don't you use the Import wizard and then create an Append Query to append
the data to the new table?

File, Import, select the db, import the table(s). Go to queries, select query,
select the table, go to type query and select append, select the table and
fields and append. If the data in both tables is the same it should work
flawlessly.

HTH

Michael


Nov 12 '05 #3

P: n/a
sparks wrote:
1 need to copy the data in one table into another...but its from another database.
tables are demographics and testdata

database1 database2
demographics
personid personid same in both databases
eval eval same in both databases
autoid autoid different

testdata
autoid autoid
data1 data1
80 variables from database1 to database2
the autoid has me messed up
demographics1 demographics2
personid 1 personid 1
eval 1 eval 1
autoid 1 autoid 12

testdata1 testdata2
autoid 1 autoid 12
data1 4 data1
data2 6 data2
data3 9 data3
data4 3 data4

is there a way to copy the data in a quary ?
I put the 4 tables in a new database but I kept getting messed data.
thanks for any help
I thought this should be easy...maybe I made it tooooo hard

Jerry

Maybe consider 2 fields; AutoID and ImportID. First update all
ImportIDs to the AutoID field in the production table. Then when you
append, store the AutoID in the ImportID field.

Nov 12 '05 #4

P: n/a
well it seems that every time I dropped a table into the quary it
linked it to the wrong table---was linking it to a quary but it kept
going back to the table.
Got that fixed and everything is working now.

Thanks for tip on the idea to build another variable to hold the
autonumber.
that is where I saw it was looking at the wrong input.
And it also made it a lot easier to do than the way I was doing it.

thanks again
jerry

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.