sql server help

--------------------------------------------------------------------------------

Guys,

Please help me in creating a Stored proc for the following problem.

A) Assume that there is a database table called “Boxes” with the following columns:

Primary_key ParentName Name Position

1 BoxA BoxA1 1
2 BoxA BoxA2 2
3 BoxA BoxA3 3
4 BoxB BoxB1 1
5 BoxB BoxB2 1

B) Find all records for any of the parentNames that have duplicate positions. For example, you will notice that BoxB1 and BoxB2 for the parent box ‘BoxB’ have both a position of 1.

C) The final output should be

Primary_key ParentName Name Position

1 BoxA BoxA1 1
2 BoxA BoxA2 2
3 BoxA BoxA3 3
4 BoxB BoxB1 1
5 BoxB BoxB2 2


regards
Binu