• Jeff Moden (9/5/2010)... you need to build a "Reference Cursor" and those are best built in what they refer to as a "Package" using a "Global Reference Cursor". Packages are a bit of a pain to program but they do allow you to "group" stored procedures and functions into logical units.

    You are correct Jeff, nothing has changed in that department and reference-cursors are the way to expose the returned dataset to the application.

    In regards to packages, the logic behind is to load into memory -at once- all the code you need to perform some activity. This can backfire if packages are not well designed, like putting in the same package the procedures you need for night batch processes as well as the procedures you need for daily-hours quering.

    If in doubt, don't use packages and go for individual storedprocs and functions which are also supported.

    Hope this helps.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.