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.

570 Date, Time, and Timestamp Data 4 Chapter 18Date, Time, and Timestamp DataSQL date and time data types are collectively called datetime values. The SQL datatypes <strong>for</strong> dates, times, and timestamps are listed here. Be aware that columns of thesedata types can contain data values that are out of range <strong>for</strong> <strong>SAS</strong>.DATEspecifies 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. HP Neoview supports many other<strong>for</strong>mats <strong>for</strong> entering date data. For more in<strong>for</strong>mation, see your HP Neoview SQL<strong>Reference</strong> Manual.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 HP Neoview usesto communicate with the HP Neoview server, any fractional seconds are lost in thetransfer 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.HP Neoview Null ValuesHP Neoview has a special value called NULL. An HP Neoview 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 an HP Neoview NULL value, it interprets it as a <strong>SAS</strong> missing value.You can define a column in an HP Neoview table so that it requires data. To do thisin SQL, 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 an HP Neoview tablewith <strong>SAS</strong>/<strong>ACCESS</strong>, you can use the DBNULL= data set option to indicate whetherNULL is a valid value <strong>for</strong> specified columns.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.

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

Saved successfully!

Ooh no, something went wrong!