View Full Version : Simple delete query problem


hunoob
03-12-2009, 08:23 AM
Hi there Everyone! I am very new to access so please explain me detailed the solution if you can help.
I have the following problem:
There is one field which contains many types of data (blank, numeric, string). I would like to make very simple query which deletes all the rows which are non-numeric. How can I do that? Please help me if you can! Thank you in advance!

pbaldy
03-12-2009, 08:30 AM
Try

DELETE *
FROM TableName
WHERE Not IsNumeric(FieldName)

hunoob
03-12-2009, 11:20 AM
Thank you so much! This is what I wanted!

And what command will delete those rows where the given field is blank?

pbaldy
03-12-2009, 11:36 AM
If they're Null:

WHERE IsNull(FieldName)

or if they may also contain a zero length string:

WHERE Nz(FieldName, "") = ""