Re: pl/sql forcing RHS of = in where clause to be variable?
From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Wed, 02 Jul 2008 00:30:30 +0200
Message-ID: <486AB006.2070601@gmail.com>
>
> This could do the job for regular plsql variables, but if the actual one
> is a function parameter, i think, you *have* to reassign.
>
> Best regards
>
> Maxim
SCOTT Best regards
Date: Wed, 02 Jul 2008 00:30:30 +0200
Message-ID: <486AB006.2070601@gmail.com>
Maxim Demenko schrieb:
> Urs Metzger schrieb:
>> mh_at_pixar.com schrieb: >> Use a block with a label: >> Urs Metzger
>
> This could do the job for regular plsql variables, but if the actual one
> is a function parameter, i think, you *have* to reassign.
>
> Best regards
>
> Maxim
I should correct myself, it seems, parameter can be referenced with the name of code unit...
SQL> create or replace function abc(empno number) return varchar2 is
2 l_ename varchar2(20);
3 begin
4 select ename into l_ename from emp where empno = abc.empno;
5 return l_ename;
6 end;
7 /
Function created.
SQL> select abc(7788) from dual;
ABC(7788)
SCOTT Best regards
Maxim Received on Tue Jul 01 2008 - 17:30:30 CDT