title: ORA-06550 & PLS-00103 Errors when setting Oracle APEX item's default value
body: <p>I am trying to set the default value of an item in Oracle APEX 4.2 by selecting the first value in a table having the specified <code>VIDEO_ID</code>. In the item, under the <i>Default</i> section I have set <i>Default Value Type</i> = <code>PL/SQL EXPRESSION</code>, and in the <i>Default Value</i> block I have entered</p>
  
  <pre><code>SELECT UNIQUE_ALLEGATION_ID 
  FROM (
    SELECT UNIQUE_ALLEGATION_ID
    FROM TBL_UNIQUE_ALLEGATION
    WHERE VIDEO_ID = :P2_VIDEO_SELECT) A
  WHERE ROWNUM &lt;= 1
  ORDER BY ROWNUM;
  </code></pre>
  
  <p>This code works just fine in my Oracle editor (if I replace <code>:P2_VIDEO_SELECT</code> with a value; and I am positive that <code>:P2_VIDEO_SELECT</code> is properly set).</p>
  
  <p>However, when I run the page, I get the following error:</p>
  
  <blockquote>
    <p>ORA-06550: line 1, column 43: PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: 
    ( - + case mod new not null <code>&lt;an identifier&gt; &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt;</code>
     continue avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date 
        pipe 
  </blockquote>