ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can you use SQL to query Excel tables? (https://www.excelbanter.com/excel-programming/384114-can-you-use-sql-query-excel-tables.html)

michael.beckinsale

Can you use SQL to query Excel tables?
 
Hi All,

This is the situation l currently have:

1) Financials database tables, linked to Access, Access query tables
to extract data, Access crosstab query to get data in layout req'd.
Result imported in Excel.

This is what l would like to do:

2) Financial database tables, query table into Excel, crosstab query
in Excel.

I know how to download the financial tables using ADO & SQL so l my
questions re 2) are as follows:

a) I assume that the results of the intial query have to be written to
an Excel sheet
b) Can l then use a SQL statement within VBA to create a sheet with
the results of the crosstab query?
c) If b) can be done does anybody have any example code please?
c) Will 2) be quicker / more efficient than 1)

I have been told by a database expert that because of the layout of
the tables within the financial database a single query cannot give
the desired result. I am not an expert on SQL.

I hope l have explained myself clearly.

All advice gratefully received.

Regards

Michael beckinsale



All times are GMT +1. The time now is 12:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com