Ok try this one (assuming there are no gaps (nulls) in the middle of route):
PHP Code:Select Id, Mon1, Mon2 From Mytable
Union
Select Id, Mon2, Mon3 From Mytable
Where Mon3 Is Not Null
Union
Select Id, Mon3, Mon4 From Mytable
Where Mon4 Is Not Null
Union
Select Id, Mon4, Mon5 From Mytable
Where Mon5 Is Not Null
Order By 1,2,3;
![]()
PS: Union all will make no difference unless routes are duplicate.![]()




Reply With Quote