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

how to delete the identical rows in db2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
friend_prasad

New User


Joined: 06 Jan 2006
Posts: 12

PostPosted: Thu Mar 16, 2006 3:31 pm
Reply with quote

I HAVE 2 IDENTICAL ROWS IN DB2
FROM THAT I WANT TO DELETE ONLY A SINGLE ROW CAN ANYBODY TELL ME HOW TO DELETE A PARTICULAR ROW FROM THAT
THANKS
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Mar 16, 2006 5:06 pm
Reply with quote

http://ibmmainframes.com/viewtopic.php?t=7776

Regards,
Priyesh.
Back to top
View user's profile Send private message
T-REXDB2

New User


Joined: 28 Apr 2005
Posts: 11
Location: USA

PostPosted: Sat Mar 18, 2006 11:17 pm
Reply with quote

friend_prasad wrote:
I HAVE 2 IDENTICAL ROWS IN DB2
FROM THAT I WANT TO DELETE ONLY A SINGLE ROW CAN ANYBODY TELL ME HOW TO DELETE A PARTICULAR ROW FROM THAT
THANKS


Simply utilize the REPAIR utility to DELETE the offending RID!

Example - Remove nonindexed row found by BMCREORG+ (OEM 3rd party non-IBM tool): Given - when reorganizing space DBNAME.SPC1, the following message was encountered:

DSNU3401 DSNURBXA - ERROR LOADING INDEX, DUPLICATE KEY
INDEX = SPC1IX1
TABLE = TAB1
RID OF INDEXED ROW = X'00000888'
RID OF NONINDEXED ROW = X'00000501'


Resolution: Simply delete the nonindexed row, via REPAIR utility, executed in native JCL stream (FYI DELETE it is logged by default - LOG keyword not mandatory!).

REPAIR
LOCATE TABLESPACE DBNAME.SPC1 RID (X'00000501')
DELETE

Hope this helps, muchly!!! ;-]
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 DELETE SPUFI DB2 1
No new posts To get the count of rows for every 1 ... DB2 3
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts How to delete a user's alias from the... JCL & VSAM 11
Search our Forums:

Back to Top