Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us