[thelist] MS SQL 2000
Casey Crookston
caseyc at IntelliSoftmn.com
Tue Aug 22 10:36:55 CDT 2006
Thanks Jay. I stopped reading too soon on your first post... appreciate
the help!
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Jay Blanchard
Sent: Monday, August 21, 2006 3:24 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] MS SQL 2000
[snip]
> > SELECT COUNT(`foo`) AS `duplicate` FROM `bar` GROUP BY `foo`
> > HAVING `duplicate` > 1
1. Except if 'foo' IS NULL, where COUNT(*) might be better.
[/snip]
True, it was just a starting point. If the OP wants entire records this
query is going to get quite complex.
[snip]
2. But does the OP want one row for each row that has a duplicate, or
one row for each set of duplicates?
[/snip]
My impression was that the OP wants one unique row, regardless of the
number of duplicates.
--
More information about the thelist
mailing list