27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GET CAPTURE<br />

GET CAPTURE {ODBC }*<br />

[/CONNECT=’connection string’]<br />

[/LOGIN=login] [/PASSWORD=password]<br />

[/SERVER=host] [/DATABASE=database name]†<br />

/SQL ’select statement’<br />

[’continuation of select statement’]<br />

* You can import data from any database for which you have an ODBC driver installed.<br />

† Optional subcommands are database-specific. See “<strong>Syntax</strong> Rules” below for the subcommand(s) required<br />

by a database type.<br />

Example<br />

GET CAPTURE ODBC<br />

/CONNECT=’DSN=sales.mdb;DBQ=C:\spss10\saledata.mdb;DriverId=281;FIL=MS’+<br />

’ Access;MaxBufferSize=2048;PageTimeout=5;’<br />

/SQL = ’SELECT T0.ID AS ID‘, T0.JOBCAT AS JOBCAT, ’<br />

’‘T0‘.‘REGION‘ AS ‘REGION‘, ‘T0‘.‘DIVISION‘ AS ‘DIVISION‘,‘T0‘.‘TRAVEL‘’<br />

’ AS ‘TRAVEL‘, ‘T0‘.‘SALES‘ AS ‘SALES‘, ‘T0‘.‘VOLUME96‘ AS ‘VOLUME96‘, ’<br />

’‘T1‘.‘REGION‘ AS ‘REGION1‘, ‘T1‘.‘AVGINC‘ AS ‘AVGINC‘,‘T1‘.‘AVGAGE‘ AS’<br />

’ ‘AVGAGE‘, ‘T1‘.‘POPULAT‘ AS ‘POPULAT‘ FROM { oj ‘Regions‘ ‘T1‘ LEFT ’<br />

’OUTER JOIN ‘EmployeeSales‘ ‘T0‘ ON ‘T1‘.‘REGION‘ = ‘T0‘.‘REGION‘ } ’.<br />

Overview<br />

GET CAPTURE retrieves data from a database and converts them to a format that can be used<br />

by program procedures. GET CAPTURE retrieves data and data information and builds a<br />

working data file for the current session.<br />

Basic Specification<br />

The basic specification is one of the subcommands specifying the database type followed<br />

by the SQL subcommand and any select statement in quotation marks or apostrophes. Each<br />

line of the select statement should be enclosed in quotation marks or apostrophes, and no<br />

quoted string should exceed 255 characters.<br />

Subcommand Order<br />

The subcommand specifying the type of database must be the first specification. The SQL subcommand<br />

must be the last.<br />

<strong>Syntax</strong> Rules<br />

• Only one subcommand specifying the database type can be used.<br />

621

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!