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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a column into a new table

Status
Not open for further replies.

rilkyn

Technical User
Jan 19, 2005
33
GB
I have imported data from an excel spreadsheet which has created a table where I am missing column names or the column names are not correct.

I know how to change the column names and can manually insert columns by creating a 'select into' query. What I can't do is insert the new columns with a default value( when the query is currently run a text box appears requesting what the value should be). Is there a command that allows you to do this? I am trying to automate this as much as possible so that each query runs through a macro activated button.

Eg
macro 1 imports the data from several excel spreadsheets into 4 tables with the same table strucuture.
Macro 2 updates the newly created tables by either creating new tables in the correct table structure or updating the imported tables into the correct structure.

Eventually all the tables are combined into 1 which is then used for running queries against.
 
Are you using Microsoft Access? This forum is specifically for Microsoft SQL Server. Click the 'browse for forum' link near the top left corner of this web page to find the appropriate Access forum. Good luck.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top