Insert Column with Update Query

ISW

Board Regular
Joined
May 10, 2011
Messages
78
I did a search for this with no luck. I want to say I used to do this but it has been about two years since I have worked with Access. I know that if this is possible it should be pretty easy. One of you want to help me out here?

I thought it would go Something like this:
Filed: New_Column_Name
Table: Table_Name
Update to: ?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Thanks for the response. I will look into this more and see if it makes sense for me to do. The purpose of this is to save steps so if it will ultimately do that then we will see.

Any other suggestions are appreciated.
 
Upvote 0
The Update query is for updating values(s) in one or more existing fields in an existing table.

The Update query is NOT a means to change the structure of a Table.

You could use an ALTER TABLE data definition approach.

Here's a link to topic generally
http://islandman.org/umuc/ifsm410/DataDefinitionQuery.html


The question becomes-- When you add this field to your table, how do you populate this new field? What about the existing records that did/do not have a value for this new field?
 
Upvote 0
Another question: How often do you need to add new fields? You mention the need to 'save steps' so is it a regular requirement, say for a new month's data?

If so, you should redesign the database instead. There should be no need to add new fields when the next period's data is added. You find yourself continually updating queries, forms and reports, which is not how databases are meant to work.

Denis
 
Upvote 0
I agree with Denis - you should NOT be adding fields to the table for adding new months for the data. You should be adding ROWS of data and NOT COLUMNS. By doing so you are violating the rules of normalization and also making it much harder to do aggregating of data.

Normalize.png
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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