Sure, I thought. Easy. I wrote a simple SQL query… and hit a wall. It gave me just the first level of subcategories. And that's when I pulled out the hidden gem in SQL's toolkit — Recursive SQL.
If you are a SQL programmer, learning recursive SQL techniques can be a boon to your productivity. A recursive query is one that refers to itself. I think the best way to quickly grasp the concept of ...
Hello there! 👋 I'm Luca, a BI Developer with a passion for all things data, Proficient in Python, SQL and Power BI ...
How to Use Recursive Functions (Recursive CTEs) in SQL 1. What is Recursive SQL? Recursive SQL (a recursive query using a Common Table Expression: CTE) is an SQL technique that retrieves data by ...
cast('' as varchar) as employee_lvl_2, cast('' as varchar) as employee_lvl_3, cast('' as varchar) as employee_lvl_4 select e.employee_number, e.employee_name, e ...
,cast(emp.empConcat + ',' + cast(e.employee_number as varchar) + ',' as varchar(250)) ,case when emp.lvl=1 then emp.employee_name else emp.emp_lvl_1 end as emp_lvl_1 ...