Querying Excel-Sheets with ADO using Inner Join

K

Karla

Hi!

I use ADO to query an Excel-Worksheet. I can do this
quite well for ONE sheet.

Now I need to query two sheets using an Inner Join in the
SQL statement.

I seem to miss something creating my query since i get an
error message stating that something is wrong with my
join expression...

Here is the statement:

SELECT VP FROM `Data1$` INNER JOIN `Data2$` ON `Data1
$VP`=`Data2$VP`

Any idea anyone? thx in advance,

Karla
 
J

Jamie Collins

...
i get an
error message stating that something is wrong with my
join expression...

Here is the statement:

SELECT VP FROM `Data1$` INNER JOIN `Data2$` ON `Data1
$VP`=`Data2$VP`

Try:

SELECT T1.VP
FROM [Data1$] T1
INNER JOIN [Data2$] T2
ON T1.VP = T2.VP
;

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top