Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

Join Tek-Tips
*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.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Hoving (TechnicalUser) (OP)
18 Oct 02 11:32
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:
   
   www.ncl.ac.uk/ucs/docs/pdf/AD04.pdf
   http://www.childrens-mercy.org/stats/data/access.asp

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
Sideline (TechnicalUser)
31 Oct 02 21:52
Hoving,

Did you get this sorted?

Richard
Hoving (TechnicalUser) (OP)
17 Nov 02 22:10
> 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:

http://pages.infinit.net/rlevesqu/Scripts/ImportExport/ExportLabelsFromAccessToSPSS.txt

###

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.

Thoughts?

- Hoving
flyboytim (Programmer)
9 Mar 03 18:21
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.
flyboytim (Programmer)
9 Mar 03 18:37

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!

Back To Forum

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