Unanswered: Pass a variable in a LIKE Query - Stored Procedure
I like to pass a variable value in a LIKE query.
VARIABLE v_partition_name varchar2(32);
VARIABLE v_test varchar2(32);
VARIABLE v_test1 varchar2(32);
select COL1 into :v_partition_name
from Table1 where d_day = trunc(sysdate);
select Target_col into :v_test1
from table2 where KeyA like v_test;
I need to take COL1 from Table1 and pull out Target_col corressponding to it whichever ends with COL1 value.
The procedure is running fine for the first 2 queries but when i wrote the last one. It is throwing an error.