Re: Finding Duplicate rows
Posted in 2007
Topics: SQL Development & Query Writing, Stored Procedures & SPL
Try:
select field1, field2, field3
from table
group by 1, 2, 3
having count(*) > 1
Brian Grellinger
I.S. General Manager
Doosan Infracore America Corp
Information Systems
>>> On 7/12/2007 at 5:00 AM, in message <23812.1184231137.1184230852.855533.24420@o61g2000hsh.googlegroups.com>, WA <wakthar@gmail.com> wrote:
Hi,
I have a table which nobody knows anything about except that it
contains some important data which needs to be displayed in a report.
The problem I have is that I dont quite know which field(s) are the
key(s).
Can anyone supply some sql which I can use to see if there are
duplicates?
I only have access to Informix from Microsoft SQL Server Management
Studio Express Query using openquery statements.
I have been told that maybe there are three fields within this table
that make up the key but they are not sure.
If I can execute some sql with these 3 fields to see if there are
duplicates then maybe I can assume that these are the key fields.
BTW I am a database developer but a C# developer who has been asked to
solve this problem which has arisen.
Thanks in advance.
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list