Solved

How use an update query to make all prices 0.0000

Posted on 2012-04-11
2
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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