Re: Count of distinct records
From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 10 Dec 1999 15:14:35 GMT
Message-ID: <82r5cr$76n$1_at_news.seed.net.tw>
Date: 10 Dec 1999 15:14:35 GMT
Message-ID: <82r5cr$76n$1_at_news.seed.net.tw>
Pete Kolton <peter.kolton_at_nspmbtinternet.com> wrote in message
news:82ogs6$msg$1_at_supernews.com...
> We have a table which contains duplicate records.
>
> Obviously we can do a select count(*)... of the records in the table, and we
> can do a select distinct *... of the records in the table.
>
> What we want to do is combine these two so that we get a count of the
> distinct records.
>
> Any suggestions?
Just combine them:
select count(*) from (select distinct * from table_name);
Be ware that the length of the sort key can't be too long.
>
>
Received on Fri Dec 10 1999 - 16:14:35 CET