Hierarchical and Recursive Queries in SQL Server
Jasmin Ludolf
Content Developer
You need three ID values:
EquipmentID
EquipmentID_From
EquipmentID_To
HV - high Voltage, MV - medium voltage, LV - low voltage
Cable, Overhead Line, Transformer
good,bad,repair,exchange
Find the power lines to be replaced
+-----------------+---------------------------+
| Line | Condition |
|-----------------|---------------------------|
| 1 | exchange |
|-----------------|---------------------------|
| 2 | repair |
|-----------------|---------------------------|
| 3 | bad |
+-----------------+---------------------------+
Hierarchical and Recursive Queries in SQL Server