MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

delete duplicate rows.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Nov 22, 2007 7:26 am    Post subject: delete duplicate rows. Reply with quote

Hi,

There is a DB2 table which does not have any primary or foreign key.

There are duplicate rows in the table. Is it possible to retain one among them and delete the other duplicates by SQL queries?

Or

Should this be handled programatically using Cursors?

Please help.

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Thu Nov 22, 2007 2:47 pm    Post subject: Reply with quote

use some tool, it's a easy task
e.g.
unload data, DFSORT remove duplication, load back
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Fri Nov 23, 2007 7:07 am    Post subject: Reply with quote

videlord, Thank you for giving alterantive solution.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Mon Nov 26, 2007 3:44 am    Post subject: Reply with quote

mf_user,

Check the below link.

http://www.mvsforums.com/helpboards/viewtopic.php?t=1745&highlight=delete+duplicate+rows+table
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Mon Nov 26, 2007 5:38 am    Post subject: Reply with quote

wow. Thanks to vkphani & kolusu. It is very useful to me.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group