Omnis Technical Note TNNO0007
Removing duplicate rows from a list
For Omnis Classic
By Omnis Technical Support (with Developer collaboration)
Is there a fast and effective technique for removing
duplicate rows from a list?
Of course there is - here's how.
This routine can come in two basic forms:
1. A straight removal of rows where the value in the same column of existing
rows is duplicated.
2. The removal of duplicate rows is created when two lists are merged
The following routine was the fastest of all the methods submitted.
myList: 1578 rows of which 250 are scattered duplicates of myCol.
Set current list (myList) |
Set sort field (myCol) |
Sort list |
Set search as calculation {myList(1,#L)=myList(1,#L-1)} |
Search list (Select matches (OR),Deselect non-matches (AND)) |
Delete selected lines |
Submitted by Daniel Bogesdorfer: time = 2 secs