How do I delete the data in a field

  • Thread starter Thread starter Tony Williams
  • Start date Start date
T

Tony Williams

I have a field in a table and some records contain the words "No data" I want
to delete those words and leave the field empty for those records. I've tried
running an update query that changes the data to " " ie a space but this
space is still treated as data when I want the field to be empty. I've also
tried using Is Null in the update query but get an error message about a
missing operator when I run the query. So, how do I do this?
Thanks
Tony
 
You can update the field to null if the field is nullable (accepts null):

UPDATE tableName
SET fieldName = NULL
WHERE somethingOccurs



I strongly suggest you make a backup. As example, if you forgot the WHERE
clause, all records will be modified. So, having a backup can be a good idea
before running a query that can do massive modifications.


If the field is not nullable, you can then try to update it with its default
value ( zero, or a string with no character in it: "" as example )



Vanderghast, Access MVP
 
Update the field to:
Null

(As you found, Null is not the same as a space or zero-length string.)
 
Back
Top