Subject | Re: SQL to find duplicate values |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-02-18T15:02:02Z |
Something like
select firstname, lastname
from table
group by firstname, lastname
having count(*) > 1
Though this will not work if one of the fields are null... (e.g.
FirstName: Ronaldinho LastName: <null>)
HTH,
Set
select firstname, lastname
from table
group by firstname, lastname
having count(*) > 1
Though this will not work if one of the fields are null... (e.g.
FirstName: Ronaldinho LastName: <null>)
HTH,
Set
--- In firebird-support@yahoogroups.com, "Clay Shannon" wrote:
> Who has the SQL at hand to show records in a table that have column
> values in common. I ported an Access DB to FB and want to make sure
> that I don't have duplicate FirstName/LastName values in one of the
> tables (which, if were true, would have different ID values-one
> person would actually be multiple people, as far as the DB was
> concerned).