Regarding PL/SQL Arguments [message #36399] |
Sun, 25 November 2001 22:52  |
ram
Messages: 95 Registered: November 2000
|
Member |
|
|
Is it possible to pass a where clause inside pl/sql block so that i can use that where clause inside the pl/sql block.
for example
procedure p1(whereclause varchar2) is
begin
Here i want to use the whereclause for select or update.Is is possible.
end
----------------------------------------------------------------------
|
|
|
Re: Regarding PL/SQL Arguments [message #36401 is a reply to message #36399] |
Sun, 25 November 2001 23:47  |
Rajarshi Dasgupta
Messages: 52 Registered: October 2001
|
Member |
|
|
procedure p1(whereclause varchar2) is
i number(4);
begin
EXECUTE IMMEDIATE "SELECT EMP_NO FROM EMP " || whereclause INTO i;
end ;
This is the easiest way to do. But U can also use DBMS_SQL package..... it has got many more utilities for dynamic SELECT, DDL, & DML......
----------------------------------------------------------------------
|
|
|