Sunday, 11 March 2012

Connect By Clause

Hi,
We have "Connect By Clause" as in Oracle. Do we have the same or equivalent in MS-SQL Server 2000?
Thanks with Regards.
-MohitCan you give some explaination about "Connect By Clause" in Oracle?|||There is no connect by equivalent in SQL 2000. It has been promised for SQL Yukon.

Connect by is a way of selecting a hierarchy of records from a table. If you have a table like

empID int
empName varchar(10)
MgrID int

You can select a manager, and all of his sub-employees (and their sub-employees, and so on..) by using a connect by query.|||It's an iterative process in sql server...

you need a loop..and you need to determine how many levels you need to go...

No comments:

Post a Comment