how to find [message #375139] |
Mon, 30 July 2001 23:07 |
Deep
Messages: 15 Registered: July 2001
|
Junior Member |
|
|
i have to take a report in which i want to display only the rows (should include all columns) which are duplicate.
any help is appreciated.
|
|
|
Re: how to find [message #375140 is a reply to message #375139] |
Mon, 30 July 2001 23:27 |
Norvin
Messages: 22 Registered: July 2001
|
Junior Member |
|
|
hi, try this:
select * from tableA
where fieldX in ( select fieldX from tableA
group by fieldX
having count(fieldX) = 2);
fieldX - column you want to check if duplicate.
|
|
|
Re: how to find [message #375141 is a reply to message #375139] |
Tue, 31 July 2001 03:23 |
Deep
Messages: 15 Registered: July 2001
|
Junior Member |
|
|
select * from table1
where fieldname in
(select fieldname from table1
group by fieldname
heving count(*)>1;
|
|
|
Re: how to find [message #375142 is a reply to message #375139] |
Tue, 31 July 2001 03:23 |
Deep
Messages: 15 Registered: July 2001
|
Junior Member |
|
|
select * from table1
where fieldname in
(select fieldname from table1
group by fieldname
heving count(*)>1;
|
|
|