Re: Dynamic or Static

From: <>
Date: Wed, 1 Aug 2012 01:10:44 -0700 (PDT)
Message-ID: <>

Do You mean that variant followed will be the best?

CREATE OR REPLACE FUNCTION bind_sql( pparameter table_name.col_name%TYPE ) RETURN SYS_REFCURSOR IS

    vSql VARCHAR2( 1000 );
    vSql := 'SELECT * FROM table_name WHERE :p IS NULL OR col_name LIKE :p';     OPEN RESULT FOR vSql USING pparameter, pparameter;     RETURN ( RESULT );
END bind_sql; Received on Wed Aug 01 2012 - 03:10:44 CDT

Original text of this message