Use SQL table without inserting it into a sheet

Glory

Well-known Member
Joined
Mar 16, 2011
Messages
640
I've been looking into SQL. What I'd like to know is how to create an SQL table that's not inserted into a sheet.

I found some ideas here:

The thing is that I can't insert my tables into a sheet the way they do there. I'm using SQL in the first place because they exceed the number of rows in a sheet.

So I need to be able to write some code that will build a series of tables in the background through Excel's VBA. When that's through, I can inner join or union them and then set that final table as the database reference for my Excel pivot tables.

Is that what a "database" is? An invisible table?​
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I've tried using the macro recorder to record myself grabbing an Excel file as an external data source, but MS Query can't see any tables.

I have bold headers at the tops of lists. Do I need borders, or... how do I define a "table" that will be recognized by these programs?

edit: ms query bug, solution here
 
Last edited:
Upvote 0
On top of that, I can't use the macro recorder while grabbing a table fmo an external xls file. The wizard errors out when I try, which means that I can't even view the code it would record to start working with the vba, or the SQL, or the wtfbbq or whatever.
 
Upvote 0
Yeah, for the life of me I just don't understand. I've been trawling a bunch of sites about this and I was messing around all the first half of today with a neat SQL tutorial. But I can't figure out how to integrate what I've learned into VBA.

Can somebody please help me out with that?
 
Upvote 0

Forum statistics

Threads
1,224,579
Messages
6,179,656
Members
452,934
Latest member
mm1t1

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