Using SQL to join spreadsheets in excel
- by toms
Based on the explenation here:
How do I join two worksheets in Excel as I would in SQL?
I tried to join to excel sheets from different files into the same sheet.
However, I keep getting this error message when I try to refresh the table:
[MICROSOFT][OBDC Excel Driver] Too few parameters. Expected 5.
The SQL queries i've put in so far were:
SELECT `Sheet1$`.ID, `Sheet1$`.Name, `Sheet1$`.`L Name`
FROM `C:\Users\Tom\Book1.xlsx`.`Sheet1$` a
LEFT JOIN `C:\Users\Tom\Book2.xlsx`.`Sheet1$` b
ON a.col2= b.col2
and
SELECT `Sheet1$`.ID, `Sheet1$`.Name, `Sheet1$`.`L Name`
FROM `C:\Users\Tom\Book1.xlsx`.`Sheet1$` a
LEFT JOIN `C:\Users\Tom\Book2.xlsx`.`Sheet1$` b
ON a.`ID`= b.`ID`
and
SELECT *
FROM `C:\Users\Tom\Book1.xlsx`.`Sheet1$` a
LEFT JOIN `C:\Users\Tom\Book2.xlsx`.`Sheet1$` b
ON a.`ID`= b.`ID`
and a few combinations and alterations. I can't seem to find the solution.
I've learned that it definitely doesn't like the SELECT *.
But I can't fix it.
Can anyone suggest any solution?