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

Replace field values with same value 1

Status
Not open for further replies.

surfbum3000

Technical User
Aug 22, 2003
156
US
In my table I have numerous records with various values in a field. I would like to change the various numbers to one number.

Field Name: ResourceCategory
Data Type: Number
Value: varies (18, 11, 2, 7 etc.)

Change to:

Field Name: ResourceCategory
Data Type: Number
Value: 48
 
UPDATE yourTable
SET ResourceCategory=48
WHERE ????

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
UPDATE yourTable
SET ResourceCategory=48
WHERE ????

The only part that does not seem to work is the WHERE line.

UPDATE tbl48EdTesting
SET ResourceCategory=48
WHERE ????;

Access 2003 adds a ; to the end of the statement.
 
No criteria for the update ?
If so, obviously the syntax is:
UPDATE yourTable SET ResourceCategory=48;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
UPDATE tbl48EdTesting
SET ResourceCategory=48
WHERE ????

The criteria will be any existing number in the field. A quick glance at the table reveals numbers range from 2 - 36 with all numbers in between.

I would like to change any existing number in the ResourceCategory field to the number 48, regardless of which number is there.

I tried a range for the criteria like >1 but it doesn't work, all the numbers remain the same.
 
Take a look at my previous post.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I tried this:

UPDATE yourTable SET ResourceCategory=48;

but all the numbers remain the same.
 
Have you EXECUTED the query (the button with exclamation mark) ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top