Home » SQL & PL/SQL » SQL & PL/SQL » Find duplicate rows in a table
Find duplicate rows in a table [message #293091] Thu, 10 January 2008 21:07 Go to next message
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

Re: Find duplicate rows in a table [message #293092 is a reply to message #293091] Thu, 10 January 2008 21:14 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Will this query return duplicate combination rows in the historicalpositions table?
No, but you could have & should have just run the query to answer your own question.

Please read & FOLLOW posting guidelines as stated in URL below:
http://www.orafaq.com/forum/t/88153/0/

As an educational exercise you should practice searching this forum & use GOOGLE to find an answer to this FAQ!

[Updated on: Thu, 10 January 2008 21:19] by Moderator

Report message to a moderator

Previous Topic: How to Determine First Function Call vs Subsequent Calls
Next Topic: Can We convert just a num [1-12] to [MON]
Goto Forum:
  


Current Time: Thu Feb 06 17:08:56 CST 2025