[Babase] Conversion Errors - Deleting MEMBERS and CENSUS rows

Karl O. Pinc babase@www.eco.princeton.edu
Tue, 30 Aug 2005 21:08:16 +0000


On 08/29/2005 01:55:06 PM, Catherine Markham wrote:
> Hi all,
> 
> Leah and I talked on Friday about some of the remaining conversion  
> errors that deal with MEMBERS and CENSUS records.  Corrections for  
> just one male (MCC, for example) involves deleting about 1,300  
> records from CENSUS alone (all have status = "E").  Since these rows  
> have an old style status code, I think manual changes would also have  
> to be made to MEMBERS.
> 
> Going through and marking individual rows for deletion has worked ok  
> when I'm only correcting records for a few days up to a year or so  
> (tedious, but got the job done).  I was hoping, though, that there  
> was another method for cleaning up these remaining errors given the  
> number of rows involved in each correction.
> 
> Karl, is there a better way to use FoxPro to delete records (I use  
> the method of querying with "locate all for...", checking the row,  
> marking it for deletion, and clicking "remove deleted records"  
> button)?  Or would some sort of query or script possibly do the trick?

Foxpro may have an SQL DELETE statement:
  DELETE FROM CENSUS WHERE SNAME = 'XXX' AND DATE >= "DDDDDDDD'
    AND DATE <= 'DDDDDDDD'

It also has it's own DELETE statement which is something
like:
   USE CENSUS

   DELETE FOR DATE >= 'DDDDDD' AND DATE <= 'DDDDD'

   PACK

But you'll have to take a look at the manual to check
what works.  Whatever you do, do a backup first and run
reinterp afterwords.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein