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.

778 Sybase IQ Null Values 4 Chapter 27Sybase IQ Null ValuesSybase IQ has a special value called NULL. A Sybase IQ NULL value means anabsence of in<strong>for</strong>mation and is analogous to a <strong>SAS</strong> missing value. When <strong>SAS</strong>/<strong>ACCESS</strong>reads a Sybase IQ NULL value, it interprets it as a <strong>SAS</strong> missing value.You can define a column in a Sybase IQ table so that it requires data. To do this inSQL, you specify a column as NOT NULL, which tells SQL to allow only a row to beadded to a table if a value exists <strong>for</strong> the field. For example, NOT NULL assigned to theCUSTOMER field in the <strong>SAS</strong>DEMO.CUSTOMER table does not allow a row to beadded unless there is a value <strong>for</strong> CUSTOMER. When creating a 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.You can also define Sybase IQ columns as NOT NULL DEFAULT. For morein<strong>for</strong>mation about using the NOT NULL DEFAULT value, see your Sybase IQ <strong>Reference</strong>Manual.Knowing whether a Sybase IQ column allows NULLs or whether the host systemsupplies a default value <strong>for</strong> a column that is defined as NOT NULL DEFAULT can helpyou write selection criteria and enter values to update a table. Unless a column isdefined as NOT NULL or NOT NULL DEFAULT, it allows NULL values.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.To control how the DBMS handles <strong>SAS</strong> missing character values, use theNULLCHAR= and NULLCHARVAL= data set options.LIBNAME Statement Data ConversionsThis table shows the default <strong>for</strong>mats that <strong>SAS</strong>/<strong>ACCESS</strong> Interface to Sybase IQassigns to <strong>SAS</strong> variables to read from a Sybase IQ table when using the “Overview ofthe LIBNAME Statement <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong>” on page 87. These default <strong>for</strong>matsare based on Sybase IQ column attributes.Table 27.4LIBNAME Statement: Default <strong>SAS</strong> Formats <strong>for</strong> Sybase IQ Data TypesSybase IQ Data Type <strong>SAS</strong> Data Type Default <strong>SAS</strong> FormatCHAR(n)* character $n.VARCHAR(n)* character $n.LONG VARCHAR(n)* character $n.BIGINT numeric 20.SMALLINTTINYINTnumericnumeric6.4.INTEGER numeric 11.BIT numeric 1.DOUBLE numeric noneREAL numeric noneFLOAT numeric noneDECIMAL(p,s) numeric m.nNUMERIC(p,s) numeric m.n

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

Saved successfully!

Ooh no, something went wrong!