Date: Tue, 25 Apr 2006 10:42:21 -0700
Reply-To: Victor Kogler <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Victor Kogler <firstname.lastname@example.org>
Subject: Re: save to SQL
Content-Type: text/plain; charset=UTF-8; format=flowed
The Save Translate command is what you need. The necessary ODBC data
source will need to have been created up prior to this.
A sample command saving an SPSS file to a SQL 2000 database is shown
Save Translate /Connect = 'DSN=HSD;UID=;APP=SPSS For
/type=ODBC /Table=test_SPSS .
HSD = the name of the ODBC driver
SPQR = the name of your computer workstation
HSD_3 = the name of your SQL database
test_SPSS = the name of the data table to be created
One way to create the connect string if you are not familiar with ODBC
is to use the SPSS Database Wizard. Import an SQL table from the
database where you want to export your SPSS data and paste the syntax.
If necessary, you can create the ODBC data source at the same time with
the Wizard. Copy the Connect statement from the Wizard-created syntax
into the Save Translate syntax above, enter the name of the table you
want to create and there you are. You don't need the Wizard syntax
after you've copied the Connect string so you can delete it. The
connect string for importing a data table into SPSS is the same as for
Hopefully this points you in the right direction.
Smith, Anne wrote:
> Hi all
> I am not good with ODBC type things - so sorry for a basic question.
> Is it possible to save an SPSS dataset into SQL format. If so can someone
> run through how I would do this, (to included it in a standard process
> where the directory / filename will change each month. )
> Anne Smith