Data from database sources are easily imported using the Database Wizard. Any database that uses ODBC (Open Database Connectivity) drivers can be read directly by SPSS. ODBC drivers for many database formats are supplied on the installation CD. Additional drivers can be obtained from third party vendors. One of the most common database applications, Microsoft Access, is discussed in this example.

From the menus choose:

File
Open Database
New Query...

Select MS Access Database from the list of data sources and click Next.

If MS Access Database is not listed here, you need to run Microsoft Data Access Pack.exe, which can be found in the Microsoft Data Access Pack folder on the CD.

Click Browse to navigate to the Access database file you want to open.

Select demo.mdb and click Open to continue.

Click OK in the login dialog box.

In Step 2 you can specify the tables and variables you want to import.

Drag the entire demo table to Retrieve Fields in This Order.

In Step 4 you can select a subset of records (cases) to import (for example, males older than 30). The default is to retrieve all cases.

Click Use Random Sampling.

This option selects a random sample of cases from the data source. For large data sources, you may want to limit the number of cases to a small, representative sample to reduce the processing time.

Click Next to continue.

Field names are used to create variable names, which are limited to 8 characters. The original field names are preserved as variable labels, and you can also change the variable names before importing the database.

Click the Value Labels cell in the Gender field. This option converts string variables to integer variables, and retains the original value as the value label for the new variable.

Click Next to continue.

The SQL statement created from your selections in the Database Wizard appears in the Results Dialog box. This statement can be executed now, or saved to a file for later use.

Click Finish to import the data.

All the data in the Access database that you selected to import are now available in the SPSS Data Editor.