Table of Contents

How do I delete crash records from the database?

Issue

On occasion it may be useful to be able to delete a specific group of cases from the database. The IMWEdit program contains an option to do this.

Explanation

Sometimes data gets into the database that is not desired.  Perhaps the import definition was wrong, perhaps you received incorrect data.  To remove this data from the database simply requires that you prepare a list of which cases you want deleted.

Solution

IMWEdit, which is part of Intersection Magic, has an option to “delete list of records”. It requires that you prepare a list of case id numbers in a text file for input.

To delete all data for a particular time period, the easiest thing would be to:

  1. As always – please backup your data – just in case 🙂
    Utilities / Database / Copy
  2. Create an all data diagram for the desired time period. (a summary is fine) File / New diagram: All Data | Date range 1/1/2004 – 12/31/2004 | clear filter
    Note: If you would like to include only certain records, you could specify a filter at this point (i.e. county = El_Paso)
  3. Then click on the accident list button and create a new report that contains only “case id” and “date”
    Reports / Listing / All accidents: New RPT
    Select CaseID: Width 20 / Insert
    and Date: Width 20 /Insert
    Select Ok to save this field list
    In the Sort first by option, Choose “date”
    Select Delimit data with “spaces”
  4. Choose Ok. You will be presented with a list of case id’s and dates seperated with spaces. (don’t worry about the header info) Review the data to make sure it’s what you want to delete. (you’re welcome to add other fields if you’re not sure)
  5. Save this file as “ToDelete.txt”
    File / Save
  6. Close the list and the diagram.
    Window / Close all
  7. Start IMWEdit
    Utilities / Database / IMWEdit
  8. Select Accidents / delete list of records and choose the file you saved “toDelete.txt”. Select “No” when prompted to override normal behaviour.
  9. You will be presented with a list of case id’s to delete. This list has been loaded from the file, parsed, and checked to be sure that each one exists in the database. If this list is empty, it is because the case id’s specified are in the wrong format, or do not exist in the database. (The program only looks at the first field in the listing – it ignores everything following it)
    If everything looks ok,
    select “Yes”.
  10. You will be informed how many records were deleted.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?