Sample Dynamic Query in ORACLE Procedure

CREATE OR REPLACE PROCEDURE USPS_GET_DYNAMIC_QUERY
(
    RESULTSET OUT SYS_REFCURSOR
)
AS
    v_strSql VARCHAR(4000);
BEGIN
    v_strSql := 'SELECT * FROM TBLM_DATA';
    OPEN RESULTSET FOR v_strSql;
END;

cmiiw :).

Leave a Reply

Your email address will not be published. Required fields are marked *

Afiseaza emoticoanele Locco.Ro