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
 
how to delete the identical rows in db2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: how to delete the identical rows in db2
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: 1452
Location: Chicago, IL

PostPosted: Thu Mar 16, 2006 5:06 pm    Post subject: Re: how to delete the identical rows in db2
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    Post subject: Re: how to delete the identical rows in db2
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    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 Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm

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