Search code examples
sqlsyntaxdb2spss

SPSS syntax to connect to database


I've successfully connected to a IBM DB2 database in SPSS using the connection wizard. However, I haven't found a working method to do this using SPSS syntax. Has anyone any experience with this?


Solution

  • Besides pasting the syntax shown in the last panel of the Database Wizard, which includes the connection string and the SQL that goes with the GET DATA command, you can save the query as an spq file from that last panel and use that again in the Database Wizard by choosing Edit Query in the first step.