2008 acetone bladesystem c3000 cleaning collins count dan database debug diamond disposal eyadema flashback gaudeau golf grown lab lacquer lightsheer long membrane mpio nologging oil oracle orleans polystyrene querie query record recovery recycler recycling scn select server software solvent SYSTIMESTAMP table tetrahydrofuran thinner timestamp togo togog waste water windows work

Stored function/procedure in Oracle returning dataset

Disambiguation 'function', 'functions'

Your search yielded multiple results, here are top results:
Stored function/procedure in Oracle returning dataset
How do I create stored procedure or function on PostgreSQL that returns dataset


Every now and then you need to return dataset from stored procedure. On Oracle, any executable method that returns value is actually called function. In following example we will create small package with function that returns oracle cursor. Why cursor? Oracle does not return dataset, rather, it returns internal cursor which can be then looped through to retrieve values. This is much faster if the client abandons execution after few hundred records when the dataset would, for example, return thousands or tens of thousands of records. By keeping result as open cursor, the memory utilization can be controlled by server and query is evaluated on demand when needed.

Without further ado, here is an example of package implementation:

CREATE OR REPLACE PACKAGE MYDB.PACKAGE_TEST
AS
    -- late binding untyped cursor
    TYPE CURS_OUT IS REF CURSOR;
    -- test function that returns reference cursor
    FUNCTION TEST RETURN CURS_OUT;
END PACKAGE_TEST;


CREATE OR REPLACE PACKAGE BODY MYDB.PACKAGE_TEST
AS
    -- test function that returns reference cursor
    FUNCTION TEST RETURN CURS_OUT
    AS
    -- use late binding ref cursor type
    MYCURSOR CURS_OUT;
    BEGIN
        -- open cursor
        OPEN MYCURSOR FOR
            SELECT * FROM MYDB.MYTABLE WHERE ID BETWEEN 1700 AND 1750;
        -- return open cursor
        RETURN MYCURSOR;
    END;
END MYDB;

More info:

permanent link to article http://freecash.hogger.net/stored_function_procedure_in_oracle_returning_dataset

Silverlight 2.0 and dotNet integration - finally a set of features you can actually use
Where is SQL Server Management Studio 2008
Search engine indexing speed update #2
Search engine indexing speed test update
Still no SQL Server Management Studio Basic for SQL Server 2008 Express edition
Microsoft SQL 2008 Management Studio released
What is Cisco Hot Standby Routing Protocol (HSRP)
tomcat connector does not log cs-uri-stem and cs-uri-query properly under IIS7 and windows 2008 web edition longhorn
ISAPI filter cs-uri-query cs-uri-stem logging on 2008 Web Edition Windows Server
Additional info on SF_NOTIFY_LOG and IIS7