'SQL Spatial geometry: relation of two segments

I have a set of segments e.g.

A: geometry::STGeomFromText('LINESTRING (0 0, 20 0)', 0)
B: geometry::STGeomFromText('LINESTRING (5 0, 15 0)', 0)
C: geometry::STGeomFromText('LINESTRING (5 0, 10 0)', 0)

Is it posible to get geometry and information about disjoin and intersect of those segmets as bellow?:

Segments set:      geometry:
A                  geometry::STGeomFromText('LINESTRING (0 0, 5 0)', 0)
ABC                geometry::STGeomFromText('LINESTRING (5 0, 10 0)', 0)
BC                 geometry::STGeomFromText('LINESTRING (10 0, 15 0)', 0)
C                  geometry::STGeomFromText('LINESTRING (15 0, 20 0)', 0)

I have seen functions like STIntersects and STDisjoint but they only return boolean information.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source