countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 765
Hello friends, Hope All is well! Going crazy!
I keep getting the error msg: SQL statement is not valid. There are no columns detected in the statement.
the idea is borrowed from: https://www.contextures.com/PowerPivot-Identical-Excel-Files.html
it is to add data from a workbook (4 sheets) to an existing workbook. compiling rows on top of eachother.
The code below won't work. please help me fix it. Thank you in Advance.
I keep getting the error msg: SQL statement is not valid. There are no columns detected in the statement.
the idea is borrowed from: https://www.contextures.com/PowerPivot-Identical-Excel-Files.html
it is to add data from a workbook (4 sheets) to an existing workbook. compiling rows on top of eachother.
The code below won't work. please help me fix it. Thank you in Advance.
Code:
SELECT [JAN-APR$].* FROM [JAN-APR$]
UNION ALL
SELECT * FROM `F:\DATABASES\AvgClaimCo\15.xlsb`.[Jan-Mar$]
UNION ALL
SELECT * FROM `F:\DATABASES\AvgClaimCo\15.xlsb`.[Apr-Jun$]
UNION ALL
SELECT * FROM `F:\DATABASES\AvgClaimCo\15.xlsb`.[Jul-Sep$]
UNION ALL
SELECT * FROM `F:\DATABASES\AvgClaimCo\15.xlsb`.[Oct-Dec$]