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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Oracle 4 LIBNAME Statement Data Conversions 735Binary DataRAW(n)contains raw binary data, where n must be at least 1 and cannot exceed 255 bytes.(In Oracle Version 8, the limit is 2,000 bytes.) Values entered into columns of thistype must be inserted as character strings in hexadecimal notation. You mustspecify n <strong>for</strong> this data type.BLOBcontains raw binary data of variable length up to 2 gigabytes. Values entered intocolumns of this type must be inserted as character strings in hexadecimal notation.Oracle Null and Default ValuesOracle has a special value called NULL. An Oracle NULL value means an absence ofin<strong>for</strong>mation and is analogous to a <strong>SAS</strong> missing value. When <strong>SAS</strong>/<strong>ACCESS</strong> reads anOracle NULL value, it interprets it as a <strong>SAS</strong> missing value.By default, Oracle columns accept NULL values. However, you can define columns sothat they cannot contain NULL data. NOT NULL tells Oracle not to add a row to thetable unless the row has a value <strong>for</strong> that column. When creating an Oracle table with<strong>SAS</strong>/<strong>ACCESS</strong>, you can use the DBNULL= data set option to indicate whether NULL isa valid value <strong>for</strong> specified columns.To control how Oracle handles <strong>SAS</strong> missing character values, use the NULLCHAR=and NULLCHARVAL= data set options.For more in<strong>for</strong>mation about how <strong>SAS</strong> handles NULL values, see “Potential ResultSet Differences When Processing Null Data” on page 31.LIBNAME Statement Data ConversionsThis table shows the default <strong>for</strong>mats that <strong>SAS</strong>/<strong>ACCESS</strong> Interface to Oracle assignsto <strong>SAS</strong> variables when using the LIBNAME statement to read from an Oracle table.These default <strong>for</strong>mats are based on Oracle column attributes.Table 25.4LIBNAME Statement: Default <strong>SAS</strong> Formats <strong>for</strong> Oracle Data TypesOracle Data TypeCHAR(n) *VARCHAR2(n)LONGCLOBRAW(n)LONG RAWDefault <strong>SAS</strong> Format$w.* (wherew is the minimum of n and thevalue of the DBMAX_TEXT= option)$w. (where w is the minimum of n and thevalue of the DBMAX_TEXT= option)$w. (where w is the minimum of 32767 and thevalue of the DBMAX_TEXT= option)$w.* (where w is the minimum of 32767 andthe value of the DBMAX_TEXT= option)$HEXw.* (where w/2 is the minimum of n andthe value of the DBMAX_TEXT= option)$HEXw. (where w/2 is the minimum of 32767and the value of the DBMAX_TEXT= option)

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

Saved successfully!

Ooh no, something went wrong!