Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Unanswered: looping self join

    need help please

    this is source

    new proj id old proj id
    1077a 1077/
    1077b 1077a
    1077c 1077b
    2134a 2134/
    2134b 2134a
    2134c 2134b

    and we need to get target table as
    new proj id old proj id
    1077c 1077/
    1077c 1077a
    1077c 1077b
    1077c 1077c
    2134c 2134/
    2134c 2134a
    2134c 2134b
    2134c 2134c

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    take a look for recursion.
    Dave

  3. #3
    Join Date
    Jun 2010
    Posts
    2
    Hi Dave thanks for the reply

    can u please elaborate it more sorry i really new to sqlserver where in oracle for this we can use 'start with and connect by'

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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