Showing posts with label pub1. Show all posts
Showing posts with label pub1. Show all posts

Friday, February 17, 2012

extracting duplicate record on the same id

Hi everybody i need help on on a query on how i can extract this... with the following table below..

id pub
1 a
1 b
2 c
2 c

I need to extract only the id and pub where pub has more than one with the same id... in the case of the above the result would be

id pub

2 c
2 c

thanksHi Alex

Same question recently asked:
http://www.dbforums.com/showthread.php?t=1620094

If you are satisfied with only
2 c

returned rather than
2 c
2 c

(and the second makes no sense to me BTW) then the first answer by r937 is plenty. Otherwise go down to the bottom for the last answer.

HTH|||thanks got it..