![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS ODBC Driver User's Guide and Programmer's Reference |
This section describes two SQL options that affect how
other default conversions of data types or data values can be made:
Infer INTEGER from FORMATS and
Support VARCHAR. A third
SQL option,
Fuzz Numbers at N Places, is important in comparison
operations. You can specify these options in the SQL Options page of the
SAS ODBC Driver Configuration dialog. (See Specifying SQL Options.)
Even when no FORMAT string is
specified for SAS data, the SAS System assigns a default width and number
of decimal places to the data. If the SQL Option
Infer INTEGER from FORMAT
is selected, then the SAS ODBC driver reports SAS columns of NUM(n,0)
data types as SQL_INTEGER, where n is less than 12. This can
be important, because some PC products do not use indexes on floating-point
columns. If those columns actually contain only integer values, then using
this option enables these products to honor the index and to allow updates.
See Updating Attached Tables
for more information.
The SQL
option
Support VARCHAR causes the SAS ODBC driver to report
the data type CHAR(n) as SQL_VARCHAR, where n is
greater than 80. Because SAS is fixed width, CHAR fields are often specified
at the maximum. For example, for a list of messages the text width might be
specified as 200 characters, even though the average width is much less. Reporting
it as SQL_VARCHAR enables some PC products to use less memory.
By default, the degree of precision is 12 decimal places.
Given a number
N, then if
N1 were to be checked for
equality with
N, the SAS ODBC driver would use the SQL BETWEEN
function to determine whether
N1 > (N - (ABS(N * 10**-12))) AND N1 < (N + (ABS(N * 10**-12))).
If
N=0, the driver checks for
BETWEEN -(10**-12) AND (10**-12).
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.