Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Importing Access data to SPSS

Importing Access data to SPSS

Importing Access data to SPSS

I want to be able to import data from an Access 2000 table directly into an SPSS 11.5 file (called Survey.sav). (The field names in the Access table are identical to the variable names in the SPSS file.) Since I will need to do repeated imports (to import new data or changed data entered in the Access table overtime), I thought the best way would be to establish an ODBC connection, set up and save a query in SPSS, and then reuse it as needed to update my SPSS file.

I used the Database Capture Wizard to establish an ODBC connection between the Access table and the SPSS 11.5 file. I followed the steps from these documents:

I created and saved a query so that I can re-use it to update the Survey.sav file. But I'm having a problem. When I open up Survey.sav and then run the query (File > Open Database > Run Query . . .), SPSS creates a *new* file with the updated data instead of updating the original Survey.sav file. The new file is named "Untitled" and because it’s new it does not have the variable labels and values assigned in Survey.sav.

How can I set up the query so that my working file, Survey.sav, is updated (with both new cases and possibly original data that has been changed) instead of a new .sav file being created?

Someone suggested using "APPLY DICTIONARY FROM c:\path\Survay.sav" and/or UPDATE commands. Not being very familiar with using syntax in SPSS, I wouldn't know how to proceed, or even if these are good suggestions.

Any help is greatly appreciated. Thank you.

- Hoving

RE: Importing Access data to SPSS


Did you get this sorted?


RE: Importing Access data to SPSS

> Did you get this sorted?
> Richard

Nope. Still haven't figured it out. I did find a VB program which does what I'm trying to do, but I'm not sure where to place this program in my database (I tried making it a Module and was prompted for a Macro Name). Here's the link:



I would think that being able to *update* - not create -a .sav file with data from an Access (or Excel) file would be a common process by users. But I can't find any information about how to do it. Everything I've come across is about importing files into SPSS to create a new SPSS file with the data. If you have to do repeated imports, because the data entry takes place in Excel or Access, this means reentering the SPSS variable and value labels each time. Not very efficient if you have 100+ variables.


- Hoving

RE: Importing Access data to SPSS

It was for this reason I moved from SPSS to Stata. Although Stata is more of a command-line driven program, rather than the multiple menu selection process in SPSS, it is surprisingly easy to learn, and it is fast and powerful. You save a log, which is a text file, and edit it when you have the desired output to produce a "do" file. This will do all the actions in sequence that you have done without further intervention, and it is fast. You edit the "do" file to perform the same set of operations on a different file, which can be a file exported from Access or Excel.

You can find Stata at http://www.stata.com. There is an active online community who are very helpful at solving pronlems and supporting other users.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close