Re: complex duplicate row
Posted in 2005
Hi.
try this:
select codc, nrprezi, ...., count(*) --all columns except thosewhich you wish exclude.
from "contav".f103
group by 1,2,3, ... --group by all your non-aggregate
columns
having count(*) > 1
But beware, this kind of query on a non-indexed and very big table
may be heavy.
Later
Omar Muqoz
----- Original Message -----
From: <adrian.baceanu@gmail.com>
To: <informix-list@iiug.org>
Sent: Friday, December 16, 2005 12:05 PM
Subject: complex duplicate row
> I have the following table
>
> create table "contav".f103
> (
> codc char(5),
> codfisc char(20),
> nrprezi integer,
> nrprezf integer,
> buc integer,
> taxa float,
> fel char(1),
> numeex char(50),
> adrex char(50),
> locex char(30),
> judex char(2),
> data date,
> timp datetime year to second,
> nrord serial not null constraint "contav".n308_126,
> regl char(1)
> );
>
>
> It's there an SQL query to select the rows that are identical in all
> the columns, excepting codfisc (and nrord eventually, 'cause its
> serial) ?
sending to informix-list