Re: finding duplicate fields in a table
Posted in 2006
Art S. Kagel — — source: Usenet: comp.databases.informix
Water wrote:
> Hi Group,
>
> I am having problem finding duplicate fields in a table. I have tried
> some of the suggestions which were posted for a similar question but
> didn't get the desired output.
> so I have a table say freezer and it has column names - cane, box, row,
> freezercolumn and more. There are records which have same values for
> cane,box,row and freezercolumn only and I want to list them out.
> Could you guys help me out.
select *
from freezer out
where exists (
Select cane, box, row, freezercolumn
from freezer in
where out.cane = in.cane
and out.box = in.box
and out.row = in.row
and out.freezercolumn = in.freezercolumn
group by 1, 2, 3, 4
having count(*) > 1
);
Art S. Kagel