Re: Passing a parameter to a Where Clause in PL/SQL !

From: Andreas Ballenthin <ballenth_at_gmx.de>
Date: Sat, 08 Dec 2001 19:56:53 +0100
Message-ID: <3C126275.53DCB47F_at_gmx.de>


Hi,

> d_column = nvl(ai_str3, d_column)
> Would that work or what do you think I should do?

It works.

I used something like that in a procedure

PROCEDURE something (vn_param_1 NUMBER, vn_param_2 NUMBER DEFAULT NULL) IS
  CURSOR Cur_stuff IS
    SELECT *

      FROM a
     WHERE attribute_1 = vn_param_1
       AND attribute_2 = NVL(vn_param_2, attribute_2);
BEGIN
  --and so on
END; cu
Andreas Received on Sat Dec 08 2001 - 19:56:53 CET

Original text of this message