Delete duplicates records without data in field name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I would like syntax query for delete duplicates records without data in the
Field1:

Ex:
Id Field1 Field2 Field...
1 abc def ghi
2
2 xxx yyy zzz

Delete all duplicates records (2 in example) where the first field hasn't
data.

Thanks in advance.
an
 
I don't see any duplicates in your sample data. If you are simply wanting
to delete all records where Field1 is null, the SQL is:

DELETE * FROM YourTableName WHERE Field1 Is Null;

HTH,

Rob
 
In adition:

There are records no duplicates with without data in Field1.
With:
DELETE * FROM YourTableName WHERE Field1 Is Null;
delete all records.

Ex:
Id Field1 Field2 Field...
1 abc def ghi
2
2 xxx yyy zzz
3
4 hhh
5 www

Where the record 3 hasn't data but is not to delete.
in this example I would like delete only the "first" record 2 (where hasn't
data)
Thanks more one time.
an
 
DELETE *
FROM YourTableName
WHERE Field1 is Null AND
ID IN (SELECT ID FROM YourTableName as Temp WHERE Temp.Field1 is not null)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top