Home > SQL Server Tips > Data Warehousing and Business Intelligence > Accessing external databases with Excel
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATA WAREHOUSING AND BUSINESS INTELLIGENCE

Accessing external databases with Excel


Barrie Sosinsky, Contributor
09.05.2001
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


It is often useful to access external database files when working with Excel. One of the advantages is that you can import the data into Excel and then manipulate it and format it by using tools that are most likely already familiar. Excel is capable of reading some database files directly, particularly those with a DBF extension. A small file can be downloaded into Excel in its entirety. However, in most cases, you do not need the entire file but are interested only in certain fields. You may want to import certain data and exclude other fields not necessary to your project. In that event you need to query the database and load into your worksheet only a subset of the external database.

On a Windows client, the first thing you must do is to install Microsoft Query. You will be prompted to install it when you select the the Create New Query command fron the Get External Data submenu on the Data menu. Rerun the Excel or Microsoft Office setup program and install Query.

To work with an external database file once Microsoft Query is installed, use the Create New Query command to launch the Query wizard and indicate the database you want to query. Specify the fields or records that you want, and indicate how you want the data returned: to a worksheet or as a pivot table. If you wish, save the query in a file for use later. You can refresh the file at some point in the future and it will update the values if there have been any changes since it was last used.

Run Excel simultaneously with Query and switch back and forth between the programs. As Query initiates, it will display the Choose Data Source dialog box, which contains three tabs. The first tab to the left is Databases, and it lists the data sources that are known to Query. It may be empty unless data sources are defined on your particular system. If you frequently work with external databases, these should be listed here. The second tab is named Queries and contains a list of stored queries that can be reused. This also may or may not be empty. The third tab is named OLAP cubes and is used to store a list of cubes that you want to access more than once. Online analytical processing or OLAP is a way to organize large databases to accommodate the way that you prefer to analyze and manage information. The data in an OLAP database is organized by the level of detail in a hierarchical structure.

For example, if you want to track a certain business product, you can track it by where, when, and how by accessing the OLAP dimensions. A location dimension might contain fields for country, region, city, etc., while a when dimension might include the month, date, day, and year fields. Dimensions in an OLAP database can be combined to provide information about intersecting points. Because you can combine several dimensions as you prefer, OLAP databases are called cubes. Excel can connect to an OLAP source by using either the Microsoft DSS Analysis server or other third-party OLAP product that provides data source drivers, compatible with OLD-DB for OLAP. You connect to an OLAP cube the same way you connect to other external data sources. Excel displays data that you retrieve from an OLAP cube as a PivotTable or PivotChart.

About the Author

Barrie Sosinsky (barries@killerapps.com) is president of consulting company Sosinsky and Associates (Medfield MA). He has written extensively on a variety of computer topics. His company specializes in custom software (database and Web related), training and technical documentation.

For More Information

  • What do you think about this tip? E-mail us at editor@searchDatabase.com with your feedback.
  • The Best SQL Server Web Links: tips, tutorials, scripts, and more.
  • Have an SQL Server tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
  • Ask your technical SQL Server questions--or help out your peers by answering them--in our live discussion forums.
  • Check out our Ask the Experts feature: Our SQL, Database Design, Oracle, SQL Server, and DB2 gurus are waiting to answer your toughest questions.

Rate this Tip
To rate tips, you must be a member of SearchSQLServer.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SQL Server Business Intelligence (BI) and Data Warehousing
Programming report generation with SQL Server Reporting Services 2008
Using the Pivot transformation in SQL Server Integration Services
DBA career paths could lead to business intelligence
Are data warehouses made for the cloud?
Q&A: Business intelligence gets a facelift in SQL Server 2008 R2
Project Gemini gets a new name, Madison earns buzz
Speed up reports in SQL Server Reporting Services with caching
Data Transformation Services vs. SSIS: The key differences
Using package configurations in SQL Server Integration Services (SSIS)
How SQL Server 2008 components impact SharePoint implementations

Data Warehousing and Business Intelligence
Programming report generation with SQL Server Reporting Services 2008
Recommended practices for SQL Server Analysis Services aggregations
Creating and managing SQL Server Analysis Services partitions
Sharing SSAS cube data in SharePoint with PerformancePoint Server 2007
New data profiling tools in SQL Server 2008
Utilize SSAS for data predictions and classification using Excel
SQL Server 2008 Integration Services delivers new features
Parent-child dimensions in SQL Server 2005 with Analysis Services MDX
Change data capture in SQL Server 2008 improves BI reporting accuracy
Manage traces in SQL Server 2005 Analysis Services with XMLA commands

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
data aggregation  (SearchSQLServer.com)
data preprocessing  (SearchSQLServer.com)
data warehouse  (SearchSQLServer.com)
FileMaker  (SearchSQLServer.com)
GIS  (SearchSQLServer.com)
MOLAP  (SearchSQLServer.com)
pivot table  (SearchSQLServer.com)
Quiz: SQL Server 2000  (SearchSQLServer.com)
SQL  (SearchSQLServer.com)
T-SQL  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



SQL Server Development - .NET, C#, T-SQL, Visual Basic
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts