Re: Count of distinct records

From: GHouck <hksys_at_teleport.com>
Date: Thu, 09 Dec 1999 12:19:45 -0800
Message-ID: <38500EE1.2D4F_at_teleport.com>


Pete Kolton wrote:
>
> 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?

Although I think there is a better way, will not this work?

 SELECT COUNT(*) FROM (SELECT DISTINCT * FROM MYTABLE); Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Thu Dec 09 1999 - 21:19:45 CET

Original text of this message