How to Delete Records Based on a Variable
Hello,
I would like to add an alternative way of deleting records in Epidata entry if you just want to delete certain number of records.
When you move to the record you want to delete in the database, there is a “X” sign in red at the left bottom of the screen beside the area showing the number of records, navigation buttons and the button for new record entry “*” . If the red “X” button is hit, “DEL” will show up right beside. Save the record. Apply this “DEL” to the records you would like to delete in the database.
Next step is to PACK the data file. To do this, close the data entry form and go to ‘ Tools > Pack data file ‘ and select the data file which contains the records you would like to delete. This will delete the records marked as “DEL” permanently. At the same time, filename.old.rec will be created if you would like to undo the deleting.
Marking the records “DEL” does not permanently delete the records until you PACK the data file.
Hope this help.
Zaw
Myanmar
On Sat, Jul 23, 2011 at 11:30 PM, epidata-list-request@lists.umanitoba.cawrote:
Send EpiData-list mailing list submissions to epidata-list@lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit http://lists.umanitoba.ca/mailman/listinfo/epidata-list or, via email, send a message with subject or body 'help' to epidata-list-request@lists.umanitoba.ca
You can reach the person managing the list at epidata-list-owner@lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list ___________________________________
Today's Topics:
- How to Delete Records Based on a Variable (epidata-list@lists.umanitoba.ca)
- Re: How to Delete Records Based on a Variable (epidata-list@lists.umanitoba.ca)
- Re: How to Delete Records Based on a Variable (epidata-list@lists.umanitoba.ca)
Message: 1 Date: Fri, 22 Jul 2011 18:49:20 -0500 From: epidata-list@lists.umanitoba.ca Subject: [EpiData-list] How to Delete Records Based on a Variable To: epidata-list@lists.umanitoba.ca Message-ID: 679902537E215D43805DEA9BE833090E06C213D5@NORCEX1.norc.org Content-Type: text/plain; charset="us-ascii"
Hello,
I am trying to delete a subset of records in my dataset based on the value of one of the variables (hhid) in either EpiData Entry or Analysis. I am guessing it is easy, but I cannot figure it out. Can someone please advise?
Thanks,
Sam
Message: 2 Date: Fri, 22 Jul 2011 21:20:08 -0400 From: epidata-list@lists.umanitoba.ca Subject: Re: [EpiData-list] How to Delete Records Based on a Variable To: epidata-list@lists.umanitoba.ca Message-ID: BLU0-SMTP18F9651A4055C04D6E8A53FD310@phx.gbl Content-Type: text/plain; charset="us-ascii"
It's quite easy
In Analysis:
select hhid <> [value for delete] savedata newfile
You can then copy your old file as a backup and rename "newfile.rec" if you want.
In EpiData Entry:
-export data to EpiData Choose your current data (.rec) Make sure all variables are checked Check off "Use record filter" In the Filter box: hhid <> [value for delete]
You can put a more complex logical expression in the filter. Your new data are in filename.new.rec
Jamie
On 2011-07-22, Sam wrote:
I am trying to delete a subset of records in my dataset based on the value of one of the variables (hhid) in either EpiData Entry or Analysis. I am guessing it is easy, but I cannot figure it out. Can someone please advise?
Message: 3 Date: Fri, 22 Jul 2011 21:22:17 -0400 From: epidata-list@lists.umanitoba.ca Subject: Re: [EpiData-list] How to Delete Records Based on a Variable To: epidata-list@lists.umanitoba.ca Message-ID: 0bf801cc48d6$f2ee5c62$ae9510ac@norc.org Content-Type: text/plain; charset="utf-8"
Perfect, thank you!
"epidata-list@lists.umanitoba.ca" epidata-list@lists.umanitoba.ca wrote:
It's quite easy
In Analysis:
select hhid <> [value for delete] savedata newfile
You can then copy your old file as a backup and rename "newfile.rec" if you want.
In EpiData Entry:
-export data to EpiData Choose your current data (.rec) Make sure all variables are checked Check off "Use record filter" In the Filter box: hhid <> [value for delete]
You can put a more complex logical expression in the filter. Your new data are in filename.new.rec
Jamie
On 2011-07-22, Sam wrote:
I am trying to delete a subset of records in my dataset based on the value of one of the variables (hhid) in either EpiData Entry or Analysis. I am guessing it is easy, but I cannot figure it out. Can someone please advise?
EpiData-list mailing list EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list
EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list
End of EpiData-list Digest, Vol 93, Issue 13
participants (1)
-
epidata-list@lists.umanitoba.ca