Deleting 0's in a table

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!
 
D

Dirk Goldgar

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


Top