title: Oracle sql - stored procedure - concat a variable in a string
body: <p>I have a stored procedure of this kind</p>
  
  <pre><code>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;
  </code></pre>
  
  <p>The problem is that while the first query is correctly processed, the concat between the strings in <code>T_QUERY</code> gives me error (<em>invalid character</em>).</p>
  
  <p>Neither using <code>concat()</code> works, the <code>T_QUERY</code> will be pass to another stored procedure that performs the query.</p>
  
  <p>Can anyone help me?? </p>