Deleting 0's in a table

  • Thread starter Thread starter www.ttdown.com
  • Start date Start date
W

www.ttdown.com

I have a table that is imported from a .csv file. One of the fields
is a numeric field and holds the numbers 0-9. I'd like to write a
query that would get rid of all the 0's and leave the fields that
contained the 0's empty without disturbing the fields that contain the
numbers 1-9. Can anyone help?

Thanks!
 
www.ttdown.com said:
I have a table that is imported from a .csv file. One of the fields
is a numeric field and holds the numbers 0-9. I'd like to write a
query that would get rid of all the 0's and leave the fields that
contained the 0's empty without disturbing the fields that contain the
numbers 1-9. Can anyone help?

Thanks!

UPDATE MyTable
SET MyField = Null
WHERE MyField = 0;

(Modified for your table and field names, of course.) As always, make a
backup copy of the table before running an untested update query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Get rid of zeroes in a table 1
Validation Rule 7
bitwise operator in SQL 3
Inserting a leading 0 6
Simple AND query 2
5-DIGIT FORMAT IN TABLE 9
Lookup Table 6
Complicated elements in a table 9

Back
Top