I have a stored procedure of this kind
create or replace
PROCEDURE AAA
(
p_BBB IN VARCHAR,
...
)
AS
T_QUERY varchar2(3000);
BEGIN
OPEN A_CUR FOR SELECT ... BBB like '%' || p_BBB || '%';
T_QUERY := 'SELECT BBB like %'|| p_BBB ||'% ';
END AAA;
The problem is that while the first query is correctly processed, the concat between the strings in T_QUERY gives me error (invalid character).
Neither using concat() works, the T_QUERY will be pass to another stored procedure that performs the query.
Can anyone help me??
you may try
T_QUERY :='SELECT BBB like ''%'|| p_BBB ||'%''';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With