Combining Source Data from two separate Excel Workbooks via SQL Query under Table Properties

trebligbc

New Member
Joined
Dec 21, 2012
Messages
6
Mr. Excel,</SPAN>

I’m trying to combine separate workbooks (Nov2008.xlsx and Dec2008.xlsx) with Identical column headers similar to what’s being demonstrated in this online video.</SPAN>
http://www.contextures.com/PowerPivot-Identical-Excel-Files.html</SPAN>

But it’s not working… getting the following error!</SPAN>
(In fact, I get that same error even when trying to combine the two files downloaded from the site of the video!!)</SPAN>


  • “The SQL statement is not valid. There are no columns selected in the statement”</SPAN>

I pretty much followed the online video example to the letter. Any ideas?</SPAN>

</SPAN></SPAN>


Is there a way that you know of to do this?</SPAN>

Thanks,</SPAN>
Chris Gilbert</SPAN>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I discovered the problem!
In the SQL "UNION ALL" statement, the reference to the "to be merged" workbook/worksheet needs to be surrounded by `[grave accent] characters, not single- or double-quotes.

Thus,

SELECT [EastSales$].* FROM [EastSales$]UNION ALLSELECT * FROM `C:\_TEST\WestSales.xlsx`.[WestSales$]</PRE>
works when the grave accent character (on the tilde key - in the upper-left corner under the [ESC] key on my keyboard) is used. Details!
 
Upvote 0

Forum statistics

Threads
1,223,934
Messages
6,175,491
Members
452,649
Latest member
mr_bhavesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top