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

How to get duplicate field records from table


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

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Thu Oct 16, 2008 9:51 pm
Reply with quote

Hi Team ,

How can we retrieve the rows in which particular field is repeated more than n times.

For Example.
Code:
STU_NAME STU_NUMBER STU_MARKS
 AAAAA-----11111----------50
 BBBBB-----22222----------50
 CCCCC----33333----------60
 DDDDD----44444----------50
 EEEEEE-----55555----------60

In this scenario I need to get the rows which are having same marks for more than 2 rows.

Expected rows are with STU_NAME s AAAAA,BBBBB,DDDDD

Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Oct 17, 2008 12:21 am
Reply with quote

Hi,

Check this link: ibmmainframes.com/viewtopic.php?t=33912&highlight=duplicate
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Fri Oct 17, 2008 12:55 am
Reply with quote

Thank you Anuj. It is working.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Oct 17, 2008 2:07 am
Reply with quote

You're welcome.. icon_smile.gif

-Ad
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 To fetch records that has Ttamp value... DFSORT/ICETOOL 4
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Load new table with Old unload - DB2 DB2 6
Search our Forums:

Back to Top