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