Home » SQL & PL/SQL » SQL & PL/SQL » Deleting Duplicate Row Based on Timestamp (Oracle )
Deleting Duplicate Row Based on Timestamp [message #393422] Sun, 22 March 2009 14:52 Go to next message
reachmb
Messages: 4
Registered: November 2008
Location: Chennai
Junior Member
Hi,
Would like to delete the duplicate rows in table based on timestamp. Need to Keep Latest timestamp and delete the other older timestamp for the inventory_key.

Example:
Key Timestamp
10 2009/03/23 12:44
10 2009/03/23 12:45
10 2009/03/23 12:46
20 2009/03/23 12:45
20 2009/03/23 12:46
30 2009/03/23 12:45

Output:
---------
10 2009/03/23 12:46
20 2009/03/23 12:46
30 2009/03/23 12:45

Help in providing the query....
Re: Deleting Duplicate Row Based on Timestamp [message #393424 is a reply to message #393422] Sun, 22 March 2009 14:54 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Re: Deleting Duplicate Row Based on Timestamp [message #393432 is a reply to message #393422] Sun, 22 March 2009 15:49 Go to previous message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for delete duplicates and/or top 1/top N queries.

Regards
Michel
Previous Topic: How to select into a table variable with a table function
Next Topic: Errors on homework, need help
Goto Forum:
  


Current Time: Tue Dec 06 10:44:59 CST 2016

Total time taken to generate the page: 0.10076 seconds