In the Oracle PL/SQL I tried this way, it doesn't work:
sql_3 := sql_3 || q'[ upper(name_p) like Upper('%input_name%')]';
You need to escape
' and also remove q before second part of string. Square bracket in sql command will also make a problem if you're going to execute the command in Oracle
sql_3 := sql_3 || ' upper(name_p) like Upper(''%input_name%'')';
That's a bit weird but:
declare varr varchar2(100); begin varr := 'aaa'; varr := varr || q'[ upper(name_p) like Upper('%input_name%')]'; dbms_output.put_line(varr); end; /
works on my machine.