spss to access

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

spss to access

behnaz shirazi-2
Dear all

Did you have any experience in exporting spss dataset to an access database?

Could you give me a clue?


Thank you
Behnaz Shirazi

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Reply | Threaded
Open this post in threaded view
|

Re: spss to access

Oliver, Richard
Look at the SAVE TRANSLATE command. Also, in SPSS 15 there is an Export to Database Wizard that makes the process much easier.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of behnaz shirazi
Sent: Friday, April 27, 2007 2:41 PM
To: [hidden email]
Subject: spss to access

Dear all

Did you have any experience in exporting spss dataset to an access database?

Could you give me a clue?


Thank you
Behnaz Shirazi

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Reply | Threaded
Open this post in threaded view
|

Re: spss to access

behnaz shirazi-2
Thank you Oliver .I am using save translate but noting happened in my access
database.I tried the wizard too .same result?!




>From: "Oliver, Richard" <[hidden email]>
>Reply-To: "Oliver, Richard" <[hidden email]>
>To: [hidden email]
>Subject: Re: spss to access
>Date: Fri, 27 Apr 2007 14:59:22 -0500
>
>Look at the SAVE TRANSLATE command. Also, in SPSS 15 there is an Export to
>Database Wizard that makes the process much easier.
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>behnaz shirazi
>Sent: Friday, April 27, 2007 2:41 PM
>To: [hidden email]
>Subject: spss to access
>
>Dear all
>
>Did you have any experience in exporting spss dataset to an access
>database?
>
>Could you give me a clue?
>
>
>Thank you
>Behnaz Shirazi
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Reply | Threaded
Open this post in threaded view
|

Re: spss to access

Oliver, Richard
Do you get any error messages in SPSS? Errors messages from the ODBC driver will show up in the log in the Viewer.
________________________________

From: behnaz shirazi [mailto:[hidden email]]
Sent: Fri 4/27/2007 3:50 PM
To: Oliver, Richard; [hidden email]
Subject: Re: spss to access



Thank you Oliver .I am using save translate but noting happened in my access
database.I tried the wizard too .same result?!




>From: "Oliver, Richard" <[hidden email]>
>Reply-To: "Oliver, Richard" <[hidden email]>
>To: [hidden email]
>Subject: Re: spss to access
>Date: Fri, 27 Apr 2007 14:59:22 -0500
>
>Look at the SAVE TRANSLATE command. Also, in SPSS 15 there is an Export to
>Database Wizard that makes the process much easier.
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>behnaz shirazi
>Sent: Friday, April 27, 2007 2:41 PM
>To: [hidden email]
>Subject: spss to access
>
>Dear all
>
>Did you have any experience in exporting spss dataset to an access
>database?
>
>Could you give me a clue?
>
>
>Thank you
>Behnaz Shirazi
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Reply | Threaded
Open this post in threaded view
|

Re: spss to access

Ramzan Afzal-2
In reply to this post by behnaz shirazi-2
It is better to export your data from SPSS in text file with extension .txt
or .csv. Then from ACCESS import that data into ACCESS. This is much
simpler.

Ramzan


On 4/27/07, behnaz shirazi <[hidden email]> wrote:

>
> Dear all
>
> Did you have any experience in exporting spss dataset to an access
> database?
>
> Could you give me a clue?
>
>
> Thank you
> Behnaz Shirazi
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
Reply | Threaded
Open this post in threaded view
|

Re: spss to access

Boer, CPJ de
Hi Behnaz,

I have to do this from time to time and it is fairly easy to do.

1) Start Access and make an empty database.
2) Create a table (name not important) with at least 1 field (name and type not important).
3) Save the database and exit Access
4) Start SPSS
5) File-->Open Database-->New query...
6) Select 'MS Access Database' from the list and click OK
7) Browse to the created Access-database en click 'Open'
8) Drag the table from the left to the right pane, click Next
9) click Next, Next, Next
10) tag 'Paste it into the syntax editor for further modification', click Finish
11) Open the syntax editor
12) Change 'GET DATA /TYPE' into 'SAVE TRANSLATE TYPE' (note the disappearing of the slash)
13) Remove the line /SQL='......'
14) Add the line /TABLE="tablename"  (don't use spaces as SPSS thinks that to be illegal...)
15) Add the line /MAP
16) Remove the line VARIABLE LABELS .... (don't forget the period)
17) If not allready done while opening SPSS, load the SPSS-datafile you want to export
18) In the syntax-editor: Run-->All
19) The output window should show the exported fields.
20) Open the database
21) Open the table. It should show all the data.

Note that a table in Access can have no more than 255 fields...


==[Result of importing from Access]==
GET DATA /TYPE=ODBC /CONNECT=
'DSN=MS Access-database;DBQ=C:\zandbak\db4.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL = 'SELECT  `T1`.`id` AS `id` FROM  `C:\zandbak\db4`.`Tabel1` `T1`'
 .
VARIABLE LABELS  id "id".
CACHE.
EXECUTE.
=====================================

==[After modification]===============
SAVE TRANSLATE TYPE=ODBC /CONNECT=
  'DSN=MS Access-database;DBQ=C:\zandbak\db4.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
  /TABLE="Tabel_naam"
  /MAP
.

CACHE.
EXECUTE.
=====================================

==[part of the output]===============
Data written to Tabel_naam.
148 variables and 1438 cases written.
Variable: IDNR               Type: Number   Width:  4   Dec: 0
Variable: NAME               Type: String   Width: 30
Variable: GEBDATUM           Type: Number   Width: 10   Dec: 0
Variable: F1_TYPE#           Type: String   Width:  8
Variable: F1_CODE#           Type: Number   Width:  3   Dec: 0
Variable: F1_MEDIC           Type: Number   Width:  2   Dec: 0
[..... etc....]
Variable: F2_MENIN           Type: Number   Width:  8   Dec: 0
Variable: F2_ADVIE           Type: Number   Width:  2   Dec: 0
Variable: F3_MEE             Type: Number   Width:  8   Dec: 0
Variable: F3_R_UIT           Type: Number   Width:  8   Dec: 0
=====================================

With kind regards,

Kees de Boer
________________________________
Ing. C.P.J. (Kees) de Boer
EMGO, VUmc
Datamanagement & Systeembeheer
D-451 tel. 020-44 49828

"Geloof: Geloven zonder bewijs in wat iemand die spreekt zonder kennis heeft gezegd over zaken die onvergelijkbaar zijn." Ambrose Bierce

__________________________________________________________________________________
-----Oorspronkelijk bericht-----
Van: SPSSX(r) Discussion [mailto:[hidden email]]Namens Ramzan
Afzal
Verzonden: maandag 30 april 2007 14:04
Aan: [hidden email]
Onderwerp: Re: spss to access


It is better to export your data from SPSS in text file with extension .txt
or .csv. Then from ACCESS import that data into ACCESS. This is much
simpler.

Ramzan


On 4/27/07, behnaz shirazi <[hidden email]> wrote:

>
> Dear all
>
> Did you have any experience in exporting spss dataset to an access
> database?
>
> Could you give me a clue?
>
>
> Thank you
> Behnaz Shirazi
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>