[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Identifying Duplicate Listings in Two Columns



This is basically more an sql-question... if you
want duplicates, I think it's very easy...

select a.rowid, a.cola, a.colb
from   table a, table b
where  a.cola = b.cola
and    a.colb = b.colb
and    a.rowid != b.rowid

Now transfer that into your own sql-flavour...

Arjan

--- "Hallmark, Robert J" <robert.j.hallmark@LMCO.COM>
wrote:
> I need to write a report which will print all rows
> where the data in columns
> A and B are both duplicated at the same time. In the
> example below I would
> want the report to print rows 1, 2, 5, 7, 8.
>
> I have been able to identify the duplicates in
> Column A by using "where
> Column_A in(select Column_A from table group by
> Column_A having
> count(*)>1)".  I have been unsuccessful at trying to
> apply this same process
> to both columns at the same time.   Any help will be
> greatly appreciated.
>
> Thanks
>
> Bob
>
>         Row #           Column A
> Column B
>         1               1000                    blue
>         2               1000                    blue
>         3               1000
> green
>         4               1000                    red
>         5               2000
> yellow
>         6               2000
> green
>         7               2000
> yellow
>         8               2000
> yellow
>         9               3000                    red
>         10              3000                    blue
>

__________________________________________________
Do You Yahoo!?
Talk to your friends online and get email alerts with Yahoo! Messenger.
http://im.yahoo.com/