Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97: Append Column and Copy Data Into Existing Table

Status
Not open for further replies.

beaudetious

Programmer
Aug 22, 2002
6
US
I would like to append a new column to an existing table in Access 97. Then I'd like to copy existing data into the new column. The data is in the same table.

For instance:

Field1 AppendedField
1 1
2 2
. .
. .
n n

Once the new field is appended, I'd like to copy over the values in Field1 into the new column. I don't want to append new rows which is all I seem able to do.

I've got the ALTER TABLE SQL working fine (I can add a new column), but what about the copying part. What's the SQL for that?

Axe
 
Thanks. I just worked that out a few minutes ago. I appreciate your help, however.
 
Could you please share your process for appending the column. This would come in very handy for me with projects I do.

Thanks,

Danny
 
Create a macro and use the RunSQL action. The SQL statement is

ALTER TABLE [TABLENAME] ADD COLUMN [COLUMNNAME] TEXT(50)

TEXT(50) is the data type, so that could be DATE, MEMO, etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top