Chapter Contents 
Previous 
Next 
SAS/ACCESS Software for Relational Databases: Reference 
For more information on these data types, see your Oracle Rdb documentation.
String Data 
Oracle Rdb SQL  Description  

CHAR(n)  fixedlength column for character string data composed of 8bit ASCII bytes where n specifies the length of the string. Use an unsigned integer (n). If you omit n , a 1character column is created. Maximum n is 65,271.  
VARCHAR(n)  varyinglength column for character string data composed of 8bit ASCII bytes, where n specifies the maximum length of the string. Use an unsigned integer (n). Maximum n is 65,269 characters.  
LONG VARCHAR  varyinglength column for character string data, which has 16,383 characters. LONG VARCHAR is equivalent to specifying VARCHAR(16,383). 
Numeric Data 
Oracle Rdb SQL  Description 

TINYINT(n)^{*} 
a tiny integer (signed byte, 8 contiguous bits). Can store a range of values from 128 through 127. 
SMALLINT(n)^{*} 
a small integer (signed 16bit word). Can store a range of values from 32,768 to 32,767. 
INTEGER(n)^{*} 
an integer (signed 32bit longword). Can store a range of values from 2**31 to (2**31)1. You can abbreviate INTEGER to INT in your program. 
BIGINT(n)^{*} 
a signed 64bit quadword. Can store a range of values from 2**63 to (2**63) 1. 
FLOAT (n)  a real (32bit) or double precision (64bit) floatingpoint number, depending on the precision indicated in the positive integer (n). If n is less than 25, FLOAT specifies a 32bit floatingpoint number. If n is 25 or greater, FLOAT specifies a 64bit floatingpoint number. The maximum value for n is 53. If n is omitted, FLOAT specifies a 64bit floatingpoint number. 
REAL  a floatingpoint number (32bit) with precision to 24 binary digits. 
DOUBLE PRECISION  a floatingpoint number (64bit) with precision to 53 binary digits. (The way this data type is stored is the closest match to the way that the SAS System stores its numeric data type; therefore, numeric columns of this type require the least processing when being accessed by the SAS System.) 
*(n) represents a scale factor that indicates the number of places to the right of the decimal point, and must be an integer in the range from 0 to 127. 
DateTime Data 
Oracle Rdb SQL  Description  

DATE ANSI  specifies a DATE that contains YEAR to DAY  
DATE DATE VMS  specifies a timestamp that contains YEAR to SECOND 
Oracle Rdb Nulls 
Columns can be defined so that they cannot contain NULL data. For example, the CREATE TABLE statement for the CUSTOMERS table defines the first column, CUSTOMER, as CHAR(8) and NOT NULL. NOT NULL tells Oracle Rdb not to add a row to the table unless the row has a value for CUSTOMER.
ACCESS Procedure Data Conversions 
The following
table shows the default SAS System variable formats
that the ACCESS procedure assigns to each Oracle Rdb SQL data type. To calculate
some of the SAS formats (for example,
(5+n).n
), see the explanation
following the table.
Oracle Rdb SQL Data Type  SAS Variable Format^{*} 


CHAR(n)  $n.n < 200 $200. n >= 200 

VARCHAR(n)  $n.n < 200 $200. n >= 200 

LONG VARCHAR  $200.  
TINYINT  4.0  
TINYINT(n)  (3+n).n  
SMALLINT  6.0  
SMALLINT(n)  (5 + n).n  
INTEGER  11.0  
INTEGER(n)  (10 + n).n  
BIGINT  20.0  
BIGINT(n)  (19 + n).n  
REAL  E14.0  
DOUBLE PRECISION  E23.0  
DATE  DATETIME21.2  
DECIMAL NUMERIC(n,n)  Oracle Rdb SQL converts to other numeric type. SAS/ACCESS supports the converted type.  
LIST OF BYTE VARYING  unsupported  
datetime intervals  unsupported  
*constant + n.n in Oracle Rdb SQL data types is equivalent to w.d in SAS formats. 
To determine how an Oracle Rdb SQL data type is formatted by the SAS System, use the following conversion example, SMALLINT(n) to (5 + n).n :
SMALLINT(1) is equivalent to a SAS format of 6.1, or (5 + 1).1  
SMALLINT(2) is equivalent to a SAS format of 7.2, or (5 + 2).2  
SMALLINT(5) is equivalent to a SAS format of 10.5, or (5 + 5).5 
If Oracle Rdb data falls outside valid SAS data ranges, you get an error message in the SAS log when you try to read the data. For example, an Oracle Rdb SQL date might not fall in the valid SAS date range.
DBLOAD Procedure Data Conversions 
SAS Variable Format 
Oracle Rdb SQL Data Type 

IBw.d, PIBw.d  INTEGER 
w.d 
TINYINT(d) 
w.d 
SMALLINT(d) 
w.d 
INTEGER(d) 
w.d 
BIGINT(d) QUADWORD(d) 
w.d 
DOUBLE PRECISION 
$n.  CHAR(n) 
Chapter Contents 
Previous 
Next 
Top of Page 
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.