Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: SQL procedure

  1. #1
    New Coder
    Join Date
    Aug 2008
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question SQL procedure

    I need some help creating a recursive plsql procedure that will take in an ID and return a SET OF ID'S
    Last edited by philmetz; 04-17-2011 at 08:58 PM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    The best way to do this is undoubtedly via a stored procedure.

    Even better is to rebuild your table with a "path" column that will allow direct queries to find most anything.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New Coder
    Join Date
    Aug 2008
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    yea thats why im asking if anyone can help me create it or show me a similar example. I cant change the table.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Well, this is the MySQL forum, and few (if any) will know PLSQL. You'd be much better off finding an Oracle-specific forum.

    I can write in MySQL and SQL Server, but I've never created SPs in Oracle.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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