Subject |
Re: Getting tid of empty rows electronically |
From |
Roger Sauer <anon@none.com> |
Date |
Tue, 26 May 2015 08:35:28 -0700 |
Newsgroups |
dbase.getting-started |
In case those empty records contain null values, you may want to use empty()
instead of ' = "" '.
delete for empty(fieldname)
"Mervyn Bick" wrote in message news:op.xy781xlj380wm4@mervynb...
On Tue, 26 May 2015 08:59:33 +0200, Pieter van Heerden <psvh@mweb.co.za>
wrote:
> When importing data from text files, I am sometimes confronted with empty
> records appended, usually at the end of the record set.
>
> How do I get rid of them programmatically?
If there is a field that will always have data in it it is quite easy.
use tablename exclusive
delete for fieldname = " "
pack
use
If there isn't a field that always will have data in it then you will have
to check more fields and possibly all of them.
delete for fieldname = " " and fieldname1 = " " and fieldname2 = " "
.......
Always keep a backup copy of your able "just in case". :-)
Mervyn.
|
|