How to Access SQL From Microsoft Office

by James Highland
database on paper image by .shock from Fotolia.com

The Structured Query Language (SQL) is used to manipulate databases. Extracting information from a database, sorting it, running analytical calculations and inserting new data are all tasks accomplished by SQL. This common language is used on many database platforms designed by different companies. Microsoft Office offers some SQL abilities. You can design SQL queries directly within its database application, Microsoft Access, or access SQL systems from within Microsoft Excel. While Microsoft Office itself is not a robust database platform, these tools are in place to extend the reach of its product suite.

SQL View in Microsoft Access

Step 1

Open Microsoft Access from the "Start" menu's "All Programs" folder in the Microsoft Office sub-menu. This program is included in many installations of the Microsoft Office product suite.

Step 2

Click on the "Queries" pane in the main Microsoft Access control panel. This is the second option in the command list along the left of any database window.

Step 3

Open an existing query by clicking any listed in the "Queries" pane, or click the "Create New Query" button. A new window will open in the query view.

Step 4

Click the "View" menu at the top of the Access window.

Select the "SQL View" option in the menu. A new window will appear. You are now able to manipulate the database using standard SQL statements.

Connect to SQL from Excel

Step 1

Open Microsoft Excel from the "Start" menu's "All Programs" folder in the Microsoft Office sub-menu.

Step 2

Click the "Data" tab at the top of the program. Click the "Microsoft Query" option in the "From other sources" menu.

Step 3

Click the "Use the Query Wizard to create/edit queries" check box in the window that appears.

Step 4

Locate any external database source in the window that you wish to connect with Excel. This can be a Microsoft Access database or an SQL server. Click "OK." The Query Wizard will launch.

Type SQL statements to customize the data import. You have now accessed an SQL interface to control how Excel extracts data from outside sources.

Items you will need

  • Microsoft Office

More Articles