title: Derby SQL Syntax error: Encountered "." when copying from one database to another
body: <p>I'm using Derby DB and trying to copy data from a table in one database to a table with the same table definition in another database.   </p>
  
  <p>What is the correct syntax to specify the database.scheme.table in Derby SQL? </p>
  
  <p>I've tried using the following select statement</p>
  
  <pre><code>statement = "INSERT INTO CH003..MHALL..CH_COMPANY SELECT * FROM CH001..MHALL..CH_COMPANY WHERE COMPANY_NUMBER = '" + companyNumber + "'";
  </code></pre>
  
  <p>but get the error Caused by: java.sql.SQLException: Syntax error: Encountered "." at line 1, column 22.</p>
  
  <p>Changing the code to </p>
  
  <pre><code> statement = "INSERT INTO CH003.MHALL.CH_COMPANY SELECT * FROM CH001.MHALL.CH_COMPANY WHERE COMPANY_NUMBER = '" + companyNumber + "'";
  </code></pre>
  
  <p>I get the error SQLSyntaxErrorException: Syntax error: Encountered "." at line 1, column 27.</p>
  
  <p>Is it possible to do this in Derby?   Do you know the correct syntax?
  Thank you for your help.  </p>