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
 

 

Wanna to retrive only the duplicate values in the table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Apr 24, 2006 3:32 pm    Post subject: Wanna to retrive only the duplicate values in the table
Reply with quote

Hi all,


I wanna to retrive only the duplicate values in the table. Can any one let me know if u have solution in ur hand. plz... icon_sad.gif
Back to top
View user's profile Send private message

shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Mon Apr 24, 2006 3:51 pm    Post subject:
Reply with quote

Code:
SELECT columns
FROM table
GROUP BY columns
HAVING COUNT(*) > 1

To retrieve duplicate Rows from the table


Correct Me if I am Wrong

Thanks
Shri
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Mon Apr 24, 2006 5:55 pm    Post subject: Re: Wanna to retrive only the duplicate values in the table
Reply with quote

Abbu,

Did you search before....http://ibmmainframes.com/viewtopic.php?t=4390

Regards,
Priyesh.
Back to top
View user's profile Send private message
vidhyanarayanan

New User


Joined: 23 Dec 2005
Posts: 52

PostPosted: Mon Apr 24, 2006 6:41 pm    Post subject:
Reply with quote

Hi,
U can use "UNION ALL" to retrieve only duplicates.
Back to top
View user's profile Send private message
appasi

New User


Joined: 12 Dec 2005
Posts: 20
Location: Bangalore

PostPosted: Mon Apr 24, 2006 7:58 pm    Post subject:
Reply with quote

Hi,

What shrivatsa has said is one of the way to retrive only duplicate values from a table

Thanks
Appasi
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Apr 24, 2006 9:15 pm    Post subject: retriving duplicate rows
Reply with quote

Hi all,

Thank u i got that.. all ur suggestions are working..

Priyesh,

I was in hurry i could not find the search result properly. any way thanks....

Thank u for all of u...
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 BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm


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