Solved

How use an update query to make all prices 0.0000

Posted on 2012-04-11
2
275 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

707 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

21 Experts available now in Live!

Get 1:1 Help Now