Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Special holiday offer! You and a friend can attend FabCon with a BOGO code. Supplies are limited. Register now.

Reply
pmscorca
Kudo Kingpin
Kudo Kingpin

How implementing an hierarchy without using a recursive CTE

Hi,

I've noticed that the warehouse T-SQL doesn't support the recursive ctes and this is a pity!

Now, how could I implement an hierarchy in T-SQL without a such useful and comfortable feature, please? Thanks

In the future, will fabric support this feature?

4 REPLIES 4
rubayatyasmin
Super User
Super User

Hi @pmscorca 

 

Did you try the closure table? sql - How can I create a closure table using data from an adjacency list? - Stack Overflow


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


lbendlin
Super User
Super User

Does it have to be in T-SQL?  Could you use the DAX PATH functions?

Hi, I need to have an hierarchy at warehouse level and not at semantic model level.

However, the recursive CTEs are also useful for other purposes.

 

Update: I've created this idea Adding support for recursive CTEs in a warehouse ; please vote it, thanks.

 Hi @pmscorca ,

Thanks for reaching out to the Microsoft fabric community forum.

You’ve taken the right step by raising and sharing the idea to add recursive CTE support. That’s currently the best path forward, as this is a platform capability gap rather than a configuration issue. Encouraging others to vote on it will help increase visibility and priority.

Best Regards, 
Community Support Team

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.