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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

650 Netezza Null Values 4 Chapter 22DATEspecifies date values. The range is 01-01-0001 to 12-31-9999. The default <strong>for</strong>matYYYY-MM-DD—<strong>for</strong> example, 1961-06-13. Netezza supports many other <strong>for</strong>mats <strong>for</strong>entering date data. For more in<strong>for</strong>mation, see your Netezza Database User’s Guide.TIMEspecifies time values in hours, minutes, and seconds to six decimal positions:hh:mm:ss[.nnnnnn]. The range is 00:00:00.000000 to 23:59:59.999999. However,due to the ODBC-style interface that <strong>SAS</strong>/<strong>ACCESS</strong> Interface to Netezza uses tocommunicate with the Netezza Per<strong>for</strong>mance Server, any fractional seconds are lostin the transfer of data from server to client.TIMESTAMPcombines a date and time in the default <strong>for</strong>mat of yyyy-mm-dd hh:mm:ss[.nnnnnn].For example, a timestamp <strong>for</strong> precisely 2:25 p.m. on January 25, 1991, would be1991-01-25-14.25.00.000000. Values in a column of this type have the same rangesas described <strong>for</strong> DATE and TIME.Netezza Null ValuesNetezza has a special value called NULL. A Netezza NULL value means an absenceof in<strong>for</strong>mation and is analogous to a <strong>SAS</strong> missing value. When <strong>SAS</strong>/<strong>ACCESS</strong> reads aNetezza NULL value, it interprets it as a <strong>SAS</strong> missing value.You can define a column in a Netezza 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 Netezza 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 Netezza columns as NOT NULL DEFAULT. For more in<strong>for</strong>mationabout using the NOT NULL DEFAULT value, see your Netezza Database User’s Guide.Knowing whether a Netezza 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” in <strong>SAS</strong>/<strong>ACCESS</strong> <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong>:<strong>Reference</strong>.To control how <strong>SAS</strong> missing character values are handled by the DBMS, 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 Netezza assignsto <strong>SAS</strong> variables when using the LIBNAME statement to read from a Netezza table.These default <strong>for</strong>mats are based on Netezza column attributes.Table 22.6LIBNAME Statement: Default <strong>SAS</strong> Formats <strong>for</strong> Netezza Data TypesNetezza Data Type <strong>SAS</strong> Data Type Default <strong>SAS</strong> FormatCHAR(n)* character $n.VARCHAR(n)* character $n.

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

Saved successfully!

Ooh no, something went wrong!