Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    24

    Unanswered: 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.

    -Mohit

  2. #2
    Join Date
    Dec 2003
    Posts
    454
    Can you give some explaination about "Connect By Clause" in Oracle?

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    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.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It's an iterative process in sql server...

    you need a loop..and you need to determine how many levels you need to go...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •