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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Overview<br />

GET DATA 625<br />

GET DATA reads data from ODBC data sources (databases), Excel files (release 5 or later),<br />

and text data files. It contains functionality and syntax similar to GET CAPTURE, GET<br />

TRANSLATE, and DATA LIST.<br />

• GET DATA /TYPE=ODBC is almost identical to GET CAPTURE ODBC in both syntax and<br />

functionality.<br />

• GET DATA /TYPE=XLS reads Excel 5 or later files, whereas GET TRANSLATE reads Excel<br />

4 or earlier, Lotus, and dBASE files.<br />

• GET DATA /TYPE=TXT is similar to DATA LIST but does not create a temporary copy of the<br />

data file, significantly reducing temporary file space requirements for large data files.<br />

TYPE Subcommand<br />

The TYPE subcommand is required and must be the first subcommand specified.<br />

ODBC Data sources accessed with ODBC drivers.<br />

XLS Excel 5 or later files. For earlier versions of Excel files, Lotus 1-2-3 files, and<br />

dBASE files, see the GET TRANSLATE command.<br />

TXT Simple (ASCII) text data files.<br />

FILE Subcommand<br />

The FILE subcommand is required for TYPE=XLS and TYPE=TXT and must immediately<br />

follow the TYPE subcommand. It specifies the file to read.<br />

• File specifications should be enclosed in quotes or apostrophes.<br />

• UNC file specifications are recommended for distributed analysis mode (available with<br />

the server version of SPSS).<br />

Subcommands for TYPE=ODBC<br />

The CONNECT and SQL subcommands are both required, and SQL must be the last<br />

subcommand.<br />

CONNECT Subcommand<br />

The recommended method for generating a valid CONNECT specification is to initially use<br />

the Database Wizard and paste the resulting syntax to a syntax window in the last step of the<br />

wizard.

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

Saved successfully!

Ooh no, something went wrong!