Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Dynamic Search Conditions using PL SQL
I want to create a stored procedure which has a dynamic "Where"
condition. I don't want to create a dynamic query string in the
runtime and execute it because then it will pass the SQL on the
runtime which will reduce the performance. Therefore I need to compile
the SQL's SELECT and JOIN statements and append the WHERE clause at
runtime. Is there a way to do something like that using PL/SQL. Thanks
in advance.
The following code snippet describes the scenario.
CREATE OR REPLACE Procedure GetCustomers (filterCriteria IN varchar2) IS
........................
![]() |
![]() |