title: formula for computed column based on different table's column
body: <p>Consider this table: <code>c_const</code></p>
  
  <pre><code> code  |  nvalue
   --------------
   1     |  10000
   2     |  20000  
  </code></pre>
  
  <p>and another table <code>t_anytable</code></p>
  
  <pre><code> rec_id |  s_id  | n_code
   ---------------------
   2      |  x     | 1
  </code></pre>
  
  <p>The goal is to have <code>s_id</code> be a computed column, based on this formula:</p>
  
  <pre><code> rec_id*(select nvalue from c_const where code=ncode)
  </code></pre>
  
  <p>This produces an error:</p>
  
  <blockquote>
    <p>Subqueries are not allowed in this context. Only scalar expressions are allowed.</p>
  </blockquote>
  
  <p>How can I calculate the value for this computed column using another table's column as an input?</p>