title: How to use Jooq for a table that doesn't exist yet?
body: <p>I have a database (postgresql) with a Table Cdr. Every month a new table is created in the database that has the same schema as Table Cdr, named Cdr__ (eg. Cdr_2016_04).</p>
  
  <p>I'm trying to use Jooq to query the database, based on a date provided. The trouble is that:</p>
  
  <pre><code>context.select(CDR.fields())
              .from("cdr_2017_01")
              .where(CDR.FIELD1.eq("somevalue")
                  .and(CDR.FIELD2.notEqual("value 2")
                  .and(CDR.FIELD2.notEqual("value 3")))
              .fetchInto(Cdr.class);
  </code></pre>
  
  <p>doesn't work because it indicates that </p>
  
  <blockquote>
    <p>org.jooq.exception.DataAccessException: ...from cdr_2017_01 where ("public"."cdr"."field1" = ? and "public"."cdr"."field2" &lt;> ? and "public"."cdr"."field2" &lt;> ?)]; ERROR: missing FROM-clause entry for table "cdr"</p>
  </blockquote>
  
  <p>I've tried using an alias to make it 'cdr_2017_01 as cdr', but that fails because cdr already exists.  It seems that because I use CDR.FIELD1, and CDR.fields(), jooq requires that the table in the from clause be CDR. Is there some way to make this generic, or should I not be using Jooq for this kind of query?</p>