Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us