Subject | Re: [firebird-support] finding triple entries |
---|---|
Author | PenWin |
Post date | 2010-09-10T10:21:54Z |
Dne 10.9.2010 12:10, Christian Waldmann napsal(a):
FROM sometable
GROUP BY visitId
HAVING COUNT(*)>=3
This lists the offending visitIds. Finding rows which contain these
visitIds should be easy enough to do given a list of these IDs.
Pepak
> Hello SQL expertsSELECT visitId, COUNT(*)
>
> I have a table with a colum visitId ( and some other culoms)
>
> Each visitiId is exactly twice in the tabel. By error there are some
> visitId more than twice in the table.
>
> Who knows an efficent query to find all rows where the visitid is
> present more than two times?
FROM sometable
GROUP BY visitId
HAVING COUNT(*)>=3
This lists the offending visitIds. Finding rows which contain these
visitIds should be easy enough to do given a list of these IDs.
Pepak