13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

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.

838 Data Types <strong>for</strong> Teradata 4 Chapter 28Example 1: Unusual Teradata Table Namelibname unusual teradata user=testuser password=testpass;proc sql dquote=ansi;create view myview asselect * from unusual."More names";proc print data=myview;run;Example 2: Unusual Teradata Column Names<strong>SAS</strong>/<strong>ACCESS</strong> automatically converts Teradata column names that are not valid <strong>for</strong><strong>SAS</strong>, mapping such characters to underscores. It also appends numeric suffixes toidentical names to ensure that column names are unique.create table unusual_names( Name$ char(20), Name# char(20),"Other strange name" char(20))In this example <strong>SAS</strong>/<strong>ACCESS</strong> converts the spaces found in the Teradata columnname, OTHER STRANGE NAME, to Other_strange_name. After the automaticconversion, <strong>SAS</strong> programs can then reference the table as usual.libname unusual teradata user=testuser password=testpass;proc print data=unusual.unusual_names; run;Output 28.3PROC PRINT DisplayName_ Name_0 Other_strange_nameData Types <strong>for</strong> TeradataOverviewEvery column in a table has a name and data type. The data type tells Teradata howmuch physical storage to set aside <strong>for</strong> the column, as well as the <strong>for</strong>m in which to storethe data. This section includes in<strong>for</strong>mation about Teradata data types, null values, anddata conversions.<strong>SAS</strong>/<strong>ACCESS</strong> 9 does not support these Teradata data types: GRAPHIC,VARGRAPHIC, and LONG VARGRAPHIC.Binary String DataBYTE (n)specifies a fixed-length column of length n <strong>for</strong> binary string data. The maximum<strong>for</strong> n is 64,000.VARBYTE (n)specifies a varying-length column of length n <strong>for</strong> binary string data. Themaximum <strong>for</strong> n is 64,000.

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

Saved successfully!

Ooh no, something went wrong!