Changing a group of prices

  • Thread starter Thread starter image1
  • Start date Start date
I

image1

Is there a way to change, in table view, a section of data in a column by a
%? I need to change about 5m prices at once and was curious is there was an
easy way to do this
 
You need to use an update query to do this.
STEP 1: BACKUP your data before attempting the following.
STEP 2: BACKUP your data before attempting the following.

Without a backup you cannot restore the data if this does not work the way you
expect.

UPDATE SomeTable
SET SomeColumn=[SomeColumn]*(1+PercentChange)

In the query design view
-- Add your table
-- Add the field you want to change
-- Select Query: Update Query from the menu
-- in the Update To "cell" under the field you want to permanently change
enter something like
[SomeColumn]*(1+PercentChange)
-- Select Query: Run from the menu

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Is there a way to change, in table view, a section of data in a column by a
%?
By 'a section of data' I assume you mean some of the records. Therefore
you have to include criteria for those records or exclude those not to be
changed.

John Spencer MVP said:
You need to use an update query to do this.
STEP 1: BACKUP your data before attempting the following.
STEP 2: BACKUP your data before attempting the following.

Without a backup you cannot restore the data if this does not work the way you
expect.

UPDATE SomeTable
SET SomeColumn=[SomeColumn]*(1+PercentChange)

In the query design view
-- Add your table
-- Add the field you want to change
-- Select Query: Update Query from the menu
-- in the Update To "cell" under the field you want to permanently change
enter something like
[SomeColumn]*(1+PercentChange)
-- Select Query: Run from the menu

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Is there a way to change, in table view, a section of data in a column by a
%? I need to change about 5m prices at once and was curious is there was an
easy way to do this
 
Back
Top