Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Delete duplicate records from a table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
prashanth1

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Wed Apr 07, 2010 2:34 pm    Post subject: Delete duplicate records from a table.
Reply with quote

I have a requirment that to delete all the duplicate records expect the first record from the table.


Assume that I have 5 reords all are duplicate. I want to delete 4 duplicate records only.
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Apr 07, 2010 2:43 pm    Post subject:
Reply with quote

Hello Prashanth,

Please use the forum search facility before posting new thread. Topic has been discussed so many times in recent past.

http://www.ibmmainframes.com/viewtopic.php?t=47351&highlight=delete+duplicate
http://www.ibmmainframes.com/viewtopic.php?t=43821&start=0
Back to top
View user's profile Send private message
Manshadi

New User


Joined: 31 Aug 2005
Posts: 82

PostPosted: Sat Apr 10, 2010 11:42 am    Post subject:
Reply with quote

If you don't have more data you can use REPAIR utility for this purpose as follow :

First of all run rebuild utility for finding duplicate records .
and after that use repair utility with delete option for deleting duplicate records.

Regards
Manshadi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us