Find duplicate rows in a table [message #293091] |
Thu, 10 January 2008 21:07  |
vanathi
Messages: 74 Registered: December 2007 Location: India
|
Member |
|
|
Hi,
I want to compare uniqueness of multiple columns.
SELECT SECURITYIDENTIFIER,ACCOUNTIDENTIFIER,REFERENCETYPE,POSITIONTYPE,ASOFDATE,COUNT(asofdate)
FROM historicalpositions WHERE TRUNC(asofdate)='24 DEC 2007'
GROUP BY SECURITYIDENTIFIER,ACCOUNTIDENTIFIER,REFERENCETYPE,POSITIONTYPE,ASOFDATE
HAVING COUNT(asofdate)>1
Will this query return duplicate combination rows in the historicalpositions table?
[Updated on: Thu, 10 January 2008 21:08] Report message to a moderator
|
|
|
|