Recursive query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jarjisjaffer
    New Member
    • Aug 2007
    • 2

    Recursive query

    Hi guys,
    I've specified my task below.

    There is a table called Centre which has 2 fields called CentreNr and RelatedCentreNr .

    If i give parameter CentreNr, then it should retieve corresponding record as well as the relatedcentres till there is no related centre. For example consider the following scenario..

    If the parameter(Centr eNr) is 'A001'

    CentreNr | RelatedCentreNr
    --------------------------------------------------
    A001 | B001
    B001 | C001
    C001 | D001
    D001 | NULL

    Can anyone help me in this task?
    Thanx in advance.....
  • Saii
    Recognized Expert New Member
    • Apr 2007
    • 145

    #2
    Can you please paste your code also.

    Comment

    • jarjisjaffer
      New Member
      • Aug 2007
      • 2

      #3
      Thanx for the reply..
      i dont have any code here. I just want to create a query which is retrieving data which i have specified in my previous post...

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        please post your table structure with the field relations if any.

        Comment

        Working...