I do not have MySQL but you should be able to use:
GET DATA /Type=ODBC / . . .
If you are familiar with SQL then I recommend just working out the code from an example in the syntax guide. If not, SPSS will help create the code but it generates rather verbose, hard to read code. (Your first time, you could let SPSS to create the initial code and then edit the SQL portion for readability. )
Here is a simple example (reading from an Access database):
GET DATA /TYPE=ODBC /CONNECT='DSN=MS Access Database; DBQ=C:\Data\MyDB.mdb;'
'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
/SQL = 'SELECT ID, SchlName FROM School ORDER BY ID '
/ASSUMEDSTRWIDTH=56 .
You can create rather complex joins of multiple tables but if there are errors you will likely find the error messages not very helpful. I recommend keeping the joins simple and do the rest in SPSS.
Dennis Deck
RMC Research
-----Original Message-----
From: Brock [mailto:
[hidden email]]
Sent: Monday, February 22, 2010 6:04 PM
Subject: MySQL
Hi all,
Can SPSS V18 interface with MySQL? I am looking to read data from a database,
insert, and create tables if necessary. Any help will be greatly appreciated.
Thanks,
Brock
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD