|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
I have a simple scenario.
there is a chain of numbers connected together, say 1-2-3-4-5. This chain is present in a table(number,grp), which represent each connection between two numbers as two different records, having same grp id. for connection 1-2, we have two records, both having same grp id. In my table, the chain is represented as following --------------- number grp --------------- 1 1 2 1 2 2 3 2 3 3 4 3 4 4 5 4 But assignemt of grp ids is occuring randomly. i.e., we might have the same chain as --------------- number grp --------------- 1 2 2 2 2 1 3 1 3 4 4 4 4 5 5 5 Now how can i derive my original chain (in same order 1-2-3-4-5) using any SQL statement. |
|
#2
|
||||
|
||||
|
__________________
|
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > Need Query for Connected numbers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|