Solved

How use an update query to make all prices 0.0000

Posted on 2012-04-11
2
289 Views
Last Modified: 2012-06-27
I have a table that has a price_ea field and in this table some of the records have a value in this field.  But I want to update all of the prices to 0.  How can I do this with an update query?

--Steve
0
Comment
Question by:SteveL13
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 37832388
UPDATE yourTableName
SET [Price_ea] = 0

But this will set ALL of the prices to 0.  If you only want to set those that don't already have a value (where the value is NULL), then you would use:

UPDATE yourTableName
SET [Price_ea] = 0
WHERE [Price_ea] IS NULL
0
 
LVL 61

Expert Comment

by:mbizup
ID: 37832394
Update yourtable
Set yourfield =0
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now