PLSQL oracle select after declare ORA-06550 PLS-00103
<p>Using PL/SQL Developer client.<br>
Oracle throws me ORA-065550 PLS-00103 Encountered the symbol "SELECT".
Well, can not find what's wrong here.</p>

<pre><code>DECLARE someId NUMBER;
BEGIN
    select id into someId from someTable where someColumn = 'someUniqueValue';
    select * from someTable; --here
END;
select * from someTable; --or here
</code></pre>

<p>Neither second select, neither third works. When I dmbs_output someId into console it works well, this assigning to declared variable. But why I can not just select after 'into'? I want to declare one time value, and then make<br>
      <code>select * from someTable where id = someId</code>
or to be precised want to make like thousand inserts and I want to cache that first select.</p>

<pre><code>DECLARE someId NUMBER;
BEGIN
    select id into someId from someTable where someColumn = 'someValue';
END;
/
select * from otherTable where otherTableId = someId;
</code></pre>

<p>Here I lost someId scope I guess. </p>