title: ORA-00932: inconsistent datatypes: expected - got - ORA-06512:
body: <p>I have written a simple plsql block and it was executed successfully whenI compile it.</p>
  
  <pre><code> declare
  
   begin
    EXECUTE IMMEDIATE 'SELECT  COLUMN_ID,
          COLUMN_NAME || '' '' || DATA_TYPE || DECODE(DATA_TYPE,''ROWID'','''',''DATE'','''',NULLIF(''('' || DECODE(DATA_TYPE,''NUMBER'',DATA_PRECISION||'',''||DATA_SCALE,DATA_LENGTH) || '')'',''(,)''))  AS COLS
            FROM ALL_TAB_COLS a WHERE OWNER=USER AND TABLE_NAME=''AQ_EVENT_TABLE''';
   end;
   /
  </code></pre>
  
  <p>But,when I try to add implicit cursor then I got this error: </p>
  
  <pre><code>[Error] Execution (1: 2): ORA-00932: inconsistent datatypes: expected - got -
  ORA-06512: at line 4
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code> declare
   vSQLSlctString varchar2(255);
   begin
    EXECUTE IMMEDIATE 'SELECT  COLUMN_ID,
          COLUMN_NAME || '' '' || DATA_TYPE || DECODE(DATA_TYPE,''ROWID'','''',''DATE'','''',NULLIF(''('' || DECODE(DATA_TYPE,''NUMBER'',DATA_PRECISION||'',''||DATA_SCALE,DATA_LENGTH) || '')'',''(,)''))  AS COLS
            FROM ALL_TAB_COLS a WHERE OWNER=USER AND TABLE_NAME=''AQ_EVENT_TABLE''' INTO vSQLSlctString;
   end;
   / 
  </code></pre>