Subject Re: [firebird-support] Unable to create unique constraint
Author Svein Erling Tysvær
>1) You don't want to use indexes in your select (errors in the index may give wrong results), so try:
> select
> T.F1+0,
> T.F2+0,
> count(T.ID+0)
> from
> T
> group by
> 1, 2
> having
> count(T.ID+0) > 1

Oops, I forgot index problems could lead to there being NULL or duplicates in the PK field, so change the above query to:

select
T.F1+0,
T.F2+0,
count(*)
from
T
group by
1, 2
having
count(*) > 1

Set