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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 Under UNIX and PC Hosts 4 Date, Time, and Timestamp Data 479INTEGERspecifies a large integer. Values in a column of this type can range from–2147483648 to +2147483647.FLOAT | DOUBLE | DOUBLE PRECISIONspecifies a floating-point number that is 64 bits long. Values in a column of thistype can range from –1.79769E+308 to –2.225E−307 or +2.225E−307 to+1.79769E+308, or they can be 0. This data type is stored the same way that <strong>SAS</strong>stores its numeric data type. There<strong>for</strong>e, numeric columns of this type require theleast processing when <strong>SAS</strong> accesses them.DECIMAL | DEC | NUMERIC | NUMspecifies a mainframe-packed decimal number with an implicit decimal point. Theprecision and scale of the number determines the position of the decimal point.The numbers to the right of the decimal point are the scale, and the scale cannotbe negative or greater than the precision. The maximum precision is 31 digits.Numbers that require decimal precision greater than 15 digits might be subject torounding and conversion errors.Date, 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 in various <strong>for</strong>mats, as determined by the country code of thedatabase. For example, the default <strong>for</strong>mat <strong>for</strong> the United States is mm-dd-yyyyand the European standard <strong>for</strong>mat is dd.mm.yyyy. The range is 01-01-0001 to12-31-9999. A date always begins with a digit, is at least eight characters long,and is represented as a character string. For example, in the U.S. default <strong>for</strong>mat,January 25, 1991, would be <strong>for</strong>matted as 01-25-1991.The entry <strong>for</strong>mat can vary according to the edit codes that are associated withthe field. For more in<strong>for</strong>mation about edit codes, see your IBM documentation.TIMEspecifies time values in a three part <strong>for</strong>mat. The values range from 0 to 24 <strong>for</strong>hours (hh) and from 0 to 59 <strong>for</strong> minutes (mm) and seconds (ss). The default <strong>for</strong>m<strong>for</strong> the United States is hh:mm:ss, and the IBM European standard <strong>for</strong>mat <strong>for</strong>time is hh.mm[.ss]. For example, in the U.S. default <strong>for</strong>mat 2:25 p.m. would be<strong>for</strong>matted as 14:25:00.The entry <strong>for</strong>mat can vary according to the edit codes that are associated withthe field. For more in<strong>for</strong>mation about edit codes, see your IBM documentation.TIMESTAMPcombines a date and time and adds an optional microsecond to make a seven-partvalue of the <strong>for</strong>mat yyyy-mm-dd-hh.mm.ss[.nnnnnn]. For example, a timestamp<strong>for</strong> precisely 2:25 p.m. on January 25, 1991, would be 1991-01-25-14.25.00.000000.Values in a column of this type have the same ranges as described earlier <strong>for</strong>DATE and TIME.For more in<strong>for</strong>mation about SQL data types, datetime <strong>for</strong>mats, and edit codes thatare used in the United States and other countries, see your IBM documentation.

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

Saved successfully!

Ooh no, something went wrong!