title: execute immediate update returns NULL whilst the non string query works fine
body: <p>I have an update query which works fine. once I put this in my PLSQL block it returns NULL and there is no error. Prior to this part of the block I insert a default value into the target table, therefore I know the update is actually updating the fields to NULL. Since this query is counting the rows of each column group by another column, then there is always a value for it.and I get the correct count from the query outside of the string..</p>
  
  <p>when I place the query in my plsql Block I use the Execute immediate and the query would be a string in which my_table_name and my_column_names and Table_1 are variable.</p>
  
  <p>I searched alot and found things like I should commit and etc. But problem still there.</p>
  
  <p>for example:
  <a href="https://stackoverflow.com/questions/5023642/need-help-in-execute-immediate-update-query">Need help in execute immediate update query</a></p>
  
  <pre><code>    update Table_FINAL r
  set column_1  = 
  (
      select max(totalcount)
      from    (
              select 'my_table_name' as table_name, 'my_collumn_name' as column_name, column_3, count(*) as totalcount
              from  my_table_name a
              where exists (select 1 from Table_2 where Table_2.column_x = a.column_x)
              group by column_3
              ) s 
      where r.column_3 = s.column_3
  )
  ;
  </code></pre>
  
  <p>and here the string: </p>
  
  <pre><code>    execute immediate 'update Table_FINAL r
  set column_1  = 
  (
      select max(totalcount)
      from    (
              select ''' || my_table_name || ''' as table_name, ''' || my_collumn_name || ''' as column_name, column_3, count(*) as totalcount
              from ' ||  my_table_name || ' a
              where exists (select 1 from Table_2 where Table_2.column_x = a.column_x)
              group by column_3
              ) s 
      where r.column_3 = s.column_3
  )'
  ;
  </code></pre>