I'm trying to join three tables (each table being a separate worksheet in the same workbook) into a single recordset using the following SQL command:
strSQL = "SELECT * FROM [DD$] AS dd " & _
"INNER JOIN [MD$] AS md ON md.[Bberg ID] = MID(dd.[Bfile Underlying],5,LEN(dd.[Bfile Underlying])) " & _
"INNER JOIN [BB$] AS bb ON bb.[BBergID] = MID(dd.[Bfile Underlying],5,LEN(dd.[Bfile Underlying])) " & _
"WHERE dd.[Swap Type] = 'CDS'"
However, I keep getting a syntax error saying there is a 'missing operator' in the query.
My connection string is:
strConnect = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strFile & ";" & _
"Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";"
where strFile is the full path for the workbook.
Does JET support JOINing more than two tables?
Does anyone know what's wrong with my query?
Cheers
Bookmarks