[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
- Subject: Re: Identifying Duplicate Listings in Two Columns
- From: "Hallmark, Robert J" <robert.j.hallmark@LMCO.COM>
- Date: Mon, 1 May 2000 08:57:27 -0500
Thanks to all for the timely assistance. Concatenation of the two columns
did the trick.
Bob
On Sat, 29 Apr 2000, Hallmark, Robert J 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....
> 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.
Try the exact same logic against the concatenation of the two
fields,
along with any needed type translation. So something like (in
Oracle)
to_char(Column_A,'99999999999.99') || Column_B
should work. Just be careful that any type translation will not
alter the
data (such as too short a mask).
HTH,
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN -
http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which
exploded"