Avatar of atprato
atprato

asked on 

UNION JOIN Query of worksheets in Excel with Microsoft.Jet.Oledb.4.0 and ADODB recordset

I have 5 spreadsheets.  4 represent one very large table placed on 4 sheets.  One is a small seperate table with 3K records and one field in common with the large table placed on 4 sheets.

So using VBA I do SQL Joins of spreadsheets with ADODB recordsets and Microsoft.Jet.Oledb.4.0
The problem is I don't know how to say the following in one SQL statement:
(UNION of the four sheets) INNER JOINED (with the small fifth sheet)
So that the resulting recordset has the field that is commone to all 5 sheets, plus all the other feilds of the small sheet plus all the other fields of the Unioned sheets.  How to write this?

Visual Basic ClassicMicrosoft ExcelSQL

Avatar of undefined
Last Comment
MonkeyPushButton
ASKER CERTIFIED SOLUTION
Avatar of MonkeyPushButton
MonkeyPushButton
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

165K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo