Daisy Chain data sqls extraction

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vkunta
    New Member
    • Aug 2007
    • 1

    Daisy Chain data sqls extraction

    I have situation where table contains data where subset of a data can be linked.
    Ex: Col1 COL2
    1 2
    1 3
    3 4
    5 8
    8 9
    Some kind of Daisy Chain situation.

    I need sql which will update third column where all rows linked.
    Ex:
    COL1 COL2 Group_ID
    1 2 1
    1 3 1
    3 4 1
    5 8 2
    8 9 2


    Can anybody have any solutions using with or with out temp tables?
Working...