Copying a column in a table

GaryAtWork

Board Regular
Joined
Dec 19, 2005
Messages
83
Hi,

I'm trying to duplicate a column in an access table which has just short of 4 million records.

My initial thought (being fairly clueless in Access) was to copy and paste from the existing column into a new blank column but it tells me there is a limit to what will fit on the clipboard and it would mean 60 copy and paste operations to do what I want.

Is there a simple way to do what I'm trying to do?

In Excel I could just about manage vba to do it but I have no idea in Access.

Thanks for any help.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
if you go to your table design you can add in the new column and then populate it using an update query like this:
Code:
UPDATE [your table name] SET [your new column name] = [your old column name];

BTW - why do you have to duplicate the column? duplicated data in a database is generally frowned upon.

hth,
Giacomo
 
Upvote 0
From now onwards the duplicate column will not contain the same information as the column I'm copying from. I'd just like to populate it with duplicate information for the records that are already in the table because I have no way of finding out what the values 'would have' been if I had the extra column from the start.

Sorry to be a pain but what exactly do I do with the code you kindly posted.
For someone who is very comfortable with Excel it's embarassing how little I know about Access.

Thanks again.
 
Upvote 0
excel and access are completely different animals, no need to be embarassed. Sometimes I think it's better the less excel you know. Excel users tend to think vb is the way to solve all thier access problems. It's like swatting at flies with a 2x4.

OK, first change the table/field names in my example with the actual names from your database. Then create a new query and go to view >> sql view and paste in the code.

hth,
Giacomo
 
Upvote 0
Brilliant.

Once I'd figured out that I had to save it then run it, it worked great.

Thanks for your help and patience. :)
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top