Line_hierarchy
The syntax for Microsoft SQL Server is:
select * from line_hierarchy()
where top_mem in(
select mem_id
from ctrain.line
where mem_name like '{Line}'
)
When {Line} is replaced by a selected member Sales from Line dimension, the result is:
mem_id | mem_pid | level | top_mem |
---|---|---|---|
119 | -1 | 1 | 119 |
Both the mem_id and top_mem columns contain 119 which is the member ID for Sales.