Discussion:
Create index or filter that shows all duplicated records
(too old to reply)
Dan Pletzke
2011-07-30 17:08:05 UTC
Permalink
I'd like to use a database and show just the records that are
duplicated. I see how to create a query that will show thembut not an
index or filter. Is there a way? Thanks.
Dan Freeman
2011-07-30 19:54:02 UTC
Permalink
Post by Dan Pletzke
I'd like to use a database and show just the records that are
duplicated. I see how to create a query that will show thembut not an
index or filter. Is there a way? Thanks.
No, sorry. That's not what indexes are for.

You can go the other direction with a UNIQUE index, but they're not
necessarily reliable and should only be used for temporary indexes.

Use the query you already know about.

Dan
Bernhard Sander
2011-08-01 10:10:08 UTC
Permalink
Hi Dan,
Post by Dan Pletzke
I'd like to use a database and show just the records that are
duplicated. I see how to create a query that will show thembut not an
index or filter. Is there a way? Thanks.
The following code should give you some idea how to go for it:

USE theTable
INDEX ON SYS(2017, "", 0, 3) TAG chksum

USE theTable AGAIN IN 0 ALIAS Tab2
SET ORDER TO chksum IN Tab2

SET RELATION TO SYS(2017, "", 0, 3) INTO Tab2
SET FILTER TO recno("theTable") > recno("Tab2")

BROWSE

Now you see only records with duplicates. You see only the second, third, ...
but never the first.


Regards
Bernhard Sander

Continue reading on narkive:
Loading...