这是表结构;
code name under
1 National Sales Manager 1
2 regional sales manager 1
3 area sales manager 2
4 sales manager 3
如何获得如下所示的顶级父层次结构;
How do I get the top level parent hierarchy like below;
code name under ultimateparent
1 National Sales Manager 1 1
2 regional sales manager 1 1
3 area sales manager 2 1
4 sales manager 3 1
在常规 sql 服务器上,我将使用递归 CTE,如 SQL Server 函数以获取层次结构中的顶级父级.但是,突触数据库不支持它.
On a regular sql server I would use a recursive CTE as shown in SQL Server function to get top level parent in hierarchy. However it is not supported in synapse db's.
您是否考虑或尝试过将数据放入 json 文件并使用 Synapse 数据流为您扁平化层次结构?
Have you considered or tried landing the data in a json file and using a Synapse dataflow to flatten the hierarchy for you?
这篇关于突触顶级父层次结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!