title: Auto fill database name on query
body: <p>I have Microsoft SQL Server 2014 express.
  I have databases named by year and an "ID", for example:</p>
  
  <pre><code>2010CB
  2010PL
  2011CB
  2011YK
  2012CB
  2013CB
  ...
  20NNCB
  </code></pre>
  
  <p>And I have to do a query that detects the last year with "CB", so that:</p>
  
  <pre><code>SELECT * FROM [20NNCB][.DBO].FIELD; --being NN the higher year.
  </code></pre>
  
  <p>Any way? The years are upper than 2000 and lower than 2100.</p>
  
  <p>Thanks!!</p>