I have 2 tables, the smaller one (7000records) is an extract of the main data set (49krecords). I want to delete the records in the main dataset that match the records in the smaller one. I have linked them but cannot fathom out how to proceed?
Many thanks.
Kirix Support Forums
delete matching data
2 posts
• Page 1 of 1
Re: delete matching data
Try this:
1) Reverse the Parent/Child relationship in this case (you can delete from a parent, but not from a child).
2) In your parent table, create a calculated field with this format:
!empty(<table>.<field>)
[where "table" is the table name and "field" is the field name that you related on]
This will give you a "T" for true or and "F" for false... basically the forumla says: Is the field in the child table not empty? If so, place a "T" in the field for true.
3) Once you know which fields are not empty, you can delete all those fields (to do it in one go, make the calculated field "fixed" and then you can right-click, hit delete records for the formula "=F"). The remaining ones are "empty", so they must be unique.
Before you do this though, I STRONGLY recommend making copies of both tables so you can test things out without fear that you'll delete the wrong data.
1) Reverse the Parent/Child relationship in this case (you can delete from a parent, but not from a child).
2) In your parent table, create a calculated field with this format:
!empty(<table>.<field>)
[where "table" is the table name and "field" is the field name that you related on]
This will give you a "T" for true or and "F" for false... basically the forumla says: Is the field in the child table not empty? If so, place a "T" in the field for true.
3) Once you know which fields are not empty, you can delete all those fields (to do it in one go, make the calculated field "fixed" and then you can right-click, hit delete records for the formula "=F"). The remaining ones are "empty", so they must be unique.
Before you do this though, I STRONGLY recommend making copies of both tables so you can test things out without fear that you'll delete the wrong data.
Ken Kaczmarek
Kirix Support Team
Kirix Support Team
-
Ken - Kirix Support Team
- Posts: 147
- Joined: Mon Dec 19, 2005 10:36 am
2 posts
· Page 1 of 1
Return to Strata Help & Feedback