select data field and update another field in the same record?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have many records that contain identical numbers but differ in the
properties on these numbers (ex 3 bananas ,3 apples),and i want to use update
query to update these number, how can i use the same query to select the
property then update the number related to it.

thanks in advance
 
SQL query would look like
UPDATE [TableName]
SET [TableName].[ThisField] = 3
WHERE [TableName].[Property] = "Apple"
AND [TableName].[ThisField] = 8 << Optional line if you want to only update
8s to 3s


In the query grid
-- Add ThisField and Property to the grid
-- Select Query: Update Query from the menu
-- Type in the new value under ThisField in the Update To field
-- Type in "Apple" in the criteria under [Property]
-- Leave Update to blank under [Property]
-- If you only want to update certain numbers in [ThisField] you can add
criteria under it.
-- Select Query: Run from the menu
 
Back
Top