|
-
Jan 3rd, 2007, 05:53 AM
#1
Thread Starter
Junior Member
Database problem
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|