Example - Querying a Database Using ODBC

For this example, you must have a database connection already set up to the Northwind.mdb example database. (You can choose to include this database when you install Microsoft Access on your computer.) See How do I set up a database connection using the OLE DB provider for ODBC? for further details.

Select Create Query from the Data - Get External Data menu (or the File - Get External Data menu) to display the Database Connection dialog. Select the database connection that you have set up to Northwind.mdb and click the OK button.

At this point, STATISTICA Query will be available for you to write your query.

Use the Tree pane on the left side of the STATISTICA Query window to expand the Customers table and view its fields (to do this, either double-click on the word Customers or click the plus sign next to it). Double-click the fields CompanyName and Address to select those fields for your query (the fields are then selected and displayed in the Graphic pane on the right side of the windows).

You can then use the various menu options and/or the Text Mode to further customize your query. When you are finished specifying your query, select Return Data to STATISTICA from the File menu or click the toolbar button to display the Returning External Data to Spreadsheet dialog.

In the Returning External Data to Spreadsheet dialog, you can name your query. You can also send your query to a new spreadsheet or to the active spreadsheet by selecting the desired option button. When you are finished, click the OK button and the data your query returns will be available on the specified spreadsheet.