var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Hierarchichal query in SQL Server 2000
How to implement a hierarchical query in SQL Server 2000.
Example ; I have an Oracle Query as below
SELECT LEVEL,employee_id, manager_id, first_name, last_name
START WITH employee_id = 1
CONNECT BY prior employee_id = manager_id;
I need to get the equivalent of this query in SQL Server 2000 .
In SQL Server 2005 i can achieve this using COMMON TABLE EXPRESSION .
Is there any way to implement this in SQL Server 2000
not easily, no
Originally Posted by
if there is some maximum number of levels to the hierarchy (e.g. never more than eleven levels deep, from top executive to lowliest peon), then you can write a query with that number of LEFT OUTER JOINs
You can do this efficiently using a loop. Check out this link, and then I will answer any other questions you have:
I am unable to open the link u provided .
no error, url works just fine
Here is a little tutorial i wrote some time ago that gives you what you want.