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 <strong>ACCESS</strong> Procedure Data Conversions 737<strong>ACCESS</strong> Procedure Data ConversionsThe following table shows the default <strong>SAS</strong> variable <strong>for</strong>mats that <strong>SAS</strong>/<strong>ACCESS</strong>assigns to Oracle data types when you use the <strong>ACCESS</strong> procedure .Table 25.6PROC <strong>ACCESS</strong>: Default <strong>SAS</strong> Formats <strong>for</strong> Oracle Data TypesOracle Data TypeDefault <strong>SAS</strong> FormatCHAR(n) $n. (n 200)VARCHAR2(n) $n. (n 200)FLOATNUMBERBEST22.BEST22.NUMBER(p) w.NUMBER(p, s)DATEw.dDATETIME16.CLOB $200.RAW(n) $n. (n < 200) $200. (n > 200)BLOB RAW $200.Oracle data types that are omitted from this table are not supported by<strong>SAS</strong>/<strong>ACCESS</strong>. If Oracle data falls outside valid <strong>SAS</strong> data ranges, the values areusually counted as missing.The following table shows the correlation between the Oracle NUMBER data typesand the default <strong>SAS</strong> <strong>for</strong>mats that are created from that data type.Table 25.7Default <strong>SAS</strong> Formats <strong>for</strong> Oracle NUMBER Data TypesOracle NUMBER Data Type Rules Default <strong>SAS</strong> FormatNUMBER(p) 0 < p 0,s 0,s >0,s < p (p + 2).sNUMBER(p,s) p >0,s >0,s >= p (s + 3).sNUMBER(p) p > 32 BEST22. <strong>SAS</strong> selects <strong>for</strong>matNUMBER p, s unspecified BEST22. <strong>SAS</strong> selects <strong>for</strong>matThe general <strong>for</strong>m of an Oracle number is NUMBER(p,s) where p is the precision ands is the scale of the number. Oracle defines precision as the total number of digits, witha valid range of -84 to 127. However, a negative scale means that the number isrounded to the specified number of places to the left of the decimal. For example, if thenumber 1,234.56 is specified as data type NUMBER(8,-2), it is rounded to the nearesthundred and stored as 1,200.

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

Saved successfully!

Ooh no, something went wrong!