Access question...copying columns from one table to a new DB.

Entity

Lifer
Oct 11, 1999
10,090
0
0
I'm trying to select about 20 columns of data, filled with records, from one table in a database, and copy it into a new table in a different database. Is there an easy way to do this?

Let me explain a bit better - I'm trying to move admissions data (GPA, Degree Program, stuff like that) from one table (the current student table) to a separate table, simply marked "admissions," in a new database, to help me migrate this from Access to MySQL. Anyone have advice on how to easily do that? I figured out how to cut the column structure (in design view), but it didn't copy the data as well, and when I just try to copy the data, it says that there is too much data to copy.

Rob
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
insert into yourNewTable (field1, field2, ...)
select field1, field2, ...

That's the easiest way, in my opinion. Access also has a "append query" that facilitates this, I believe. I abhor SQL designers, so I'm more familiar with the actual SQL statements.

HTH
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Originally posted by: Descartes
insert into yourNewTable (field1, field2, ...)
select field1, field2, ...

That's the easiest way, in my opinion. Access also has a "append query" that facilitates this, I believe. I abhor SQL designers, so I'm more familiar with the actual SQL statements.

HTH

Yeah, I'm very new to access; only using it to facilitate moving our stuff over to mySQL. :D

Rob
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,003
126
Access also has a "append query" that facilitates this
Yeah, that's what I'd probably use if there was already data in the table where it was being copied. If not I'd just use a make table query using only the required items of data and then I'd just copy the whole table into the new database.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
If the number of fields (columns) to be moved is greater than the number left behind, just create a new DB/table with the data and delete those that you do not need.
Other option is to follow previous advise on using a select query and then copy the output into the new DB