statementLemma += "SELECT * FROM lemma_" + dic; statementEntry += "SELECT * FROM entry_" + dic;
statementLemma += "SELECT * FROM \"lemma_" + dic + "\""; statementEntry += "SELECT * FROM \"entry_" + dic + "\"";
  private void rebuildDBView()  {    try    {      _stm.execute("DROP VIEW IF EXISTS allEntry");      _stm.execute("DROP VIEW IF EXISTS allLemma");      // union all lemma_* and entry_*      String statementLemma = "CREATE VIEW allLemma AS ";      String statementEntry = "CREATE VIEW allEntry AS ";      Iterator<String> it = _activeDics.iterator();      while(it.hasNext())      {        String dic = it.next();        statementLemma += "SELECT * FROM lemma_" + dic;        statementEntry += "SELECT * FROM entry_" + dic;                if(it.hasNext())        {          statementLemma += " UNION ";          statementEntry += " UNION ";        }              }            _stm.execute(statementEntry);          _stm.execute(statementLemma);            // and now, the "all-knowing" view      try      {        _stm.execute("CREATE VIEW dic AS "          + "SELECT l.lemma AS lemma, e.entry AS entry, e.id AS id, l.origin AS origin, l.lemma_lower AS lemma_lower "          + "FROM allLemma l, allEntry e "          + "WHERE l.id = e.id");      }      catch(SQLException sqlEx)      {        // don't care until I find out how to know wether a view already exists      }    }    catch(Exception ex)    {      ex.printStackTrace();    }  }