Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    1

    Unanswered: Migrate Oracle "Connect By" clause to TSQL

    Hi,

    Since this is my first post, if there are any violations in the rules of the forum, please let me know so that I can correct myself from next time.

    I am currently working on migrating some oracle stored procedures to TSQL. One of the stored procedures uses "Connect By" clause in a select query, provided by Oracle. Is there a standard way to migrate this clause when we migrate this to SQL Server TSQL Stored Procedure.

    For example:

    I have a query in the oracle stored proc like:

    SELECT id FROM t1 START WITH t1.id = p_id CONNECT BY
    PRIOR t1.id = t1.parent_p_id

    where p_id is an IN parameter passed to the stored procedure.

    Please note that I have assumed "Connect By" clause syntax and usage is known to anyone who replies for this post.

    Thanks for your help.

    --
    Sri

  2. #2
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    Unfortunately, there is no off-the-shelve recursive command available in TSQL, but it will be in the next (Yukon) release.
    Johan

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    No kidding?

    [marching band playing]
    THANK GOD
    [/marching band playing]
    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
  •