简体   繁体   中英

SQL query across Access and Sybase

I have found similar questions but they all seem to be related to different servers but in the same technology / tool (eg SQL Server). Is it possible to query two different data sources ? It seems very unlikely because they also have different SQL dialects but you never know...

I have an Access database from which I need to extract data into an Excel report. I also have to pull data from another source using Sybase and then use lookups to get the proper information back.

Without using temporary tables in Excel (I've had trouble with them in the past) is it possible to have a direct link between the Access DB and the Sybase DB in a single SQL query no matter how large it would be ?

Thanks !

I think you could do this in MS Access, assuming that there's an ODBC driver available for Sybase which would allow you to setup ODBC Linked Tables. However, I'm not aware that you'll be able to do this in Excel. When I Google for Excel ODBC Linked Tables the results seem to indicate that you can use Excel as an ODBC Data Source but there's no indication that Excel allows you to have "linked tables" in the same way that you can in MS Access.

The way I understand, ADO does let you query multiple databases but the query needs to use a single connection object. So you could query two different SQL Server databases as long as the connection credentials allow you access to both of them. But I don't see that there's anyway to query two different databases using two different connection objects, which would be required in your case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM