Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamatic SQL - Where clause
Simply replace your assignment of || p_column_name || .... with a single variable that you set prior to the assignment on v_statement:
v_whereclause VARCHAR2(2000);
.
.
.
BEGIN
v_whereclause := p_column_name || '=' || p_column_value
IF p_column_name2 IS NOT NULL THEN
v_whereclause := v_whereclause||' AND ' || p_column_name2 .......
HTH
![]() |
![]() |