title: ACCESS (2010) Insert with nested SELECT (Query input must contain at least one table or query)
body: <p>I'm not to familiar with SQl or Access.</p>
  
  <p>I'm writing a INSERT INTO query in Access (2010) version of SQL. </p>
  
  <p>I'm getting the following error (<em>Query input must contain at least one table or query</em>)</p>
  
  <p>Here is my code</p>
  
  <pre><code>    INSERT INTO TABLE ( AsOf, Portfolio, [String A], [Number A] ) VALUES 
      (#DATE#, 
             (SELECT P.Portfolio FROM tb_data_Portfolio P  
                   WHERE IIF  ( EXISTS 
                      (SELECT Portfolio FROM tb_data_Portfolio p2 WHERE p2.Portfolio = 'Some String'), 
                      (P.Portfolio = 'Some String'), 
                      (P.Id = (SELECT px.Portfolio_Id FROM tb_sys_Portfolio_xRef px WHERE px.ext_Portfolio = 'Some String'))
               )
  )    
  ,'String a', 'Number a');
  </code></pre>