IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Delete duplicate records from a table.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1208
Location: Bangalore,India

PostPosted: Wed Apr 07, 2010 2:43 pm
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.

www.ibmmainframes.com/viewtopic.php?t=47351&highlight=delete+duplicate
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts DELETE SPUFI DB2 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts DSNTIAUL driven delete IBM Tools 0
Search our Forums:

Back to Top