title: SQL Query with 2 databases
body: <p>I have this Classic ASP application running with SQL Server. I use the following query:</p>
  
  <pre><code>sql = "SELECT TOP 30 r.RMANumber, r.CompanyName, r.ContactName, r.Country, r.Phone, r.IssuanceDate, r.DateReceived, r.CreatedBy " &amp; _
        "FROM rma r " &amp; _
        "WHERE r.IssuanceDate &gt;= '" &amp; startDate &amp; "' AND r.IssuanceDate &lt;= '" &amp; DateAdd("d", 1, CDate(endDate)) &amp; "' AND r.RMAClosed = 'No' " &amp; _
        "ORDER BY IssuanceDate DESC"
  </code></pre>
  
  <p>I'd like to add an <code>INNER JOIN</code> to it but the <code>INNER JOIN</code> would look in the different database. Can I do this:</p>
  
  <pre><code>sql = "SELECT TOP 30 r.RMANumber, r.CompanyName, r.ContactName, r.Country, r.Phone, r.IssuanceDate, r.DateReceived, r.CreatedBy " &amp; _
       "FROM [database1].[dbo].[rma] r " &amp; _
       "INNER JOIN [database2].[dbo].[users] u " &amp; _
  </code></pre>