Results 1 to 2 of 2

Thread: Database problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    16

    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

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width