Using a Query to Retrieve External Data

Choosing File, Open is fine for bringing an entire external data file into Excel. When the information you require resides in a server database, such as SQL Server or Oracle, or when you need to fetch particular records from a large data repository, you need a query.

When you retrieve data by means of a query, you can limit the import to records that meet particular criteria. Moreover, the incoming data becomes a "data range" on the current worksheet, allowing you to refresh the query periodically or when the need arises.

Database queries in Excel are in most cases accomplished through the intermediation of Microsoft Query, a querying tool supplied with Microsoft Office. Query generates statements in the SQL ...

Get Microsoft® Office Excel 2003 Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.