Considerations For Interval Literals - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

'year-month' | 'day:time'
specifies the date and time components of an interval literal. The day and hour fields can be
separated by a space or a colon. The interval literal strings are:
years
months
days
hours
minutes
seconds
fraction

Considerations for Interval Literals

Length of Year-Month and Day-Time Strings
An interval literal can contain a maximum of 18 digits, in the string following the INTERVAL
keyword, plus a hyphen (-) that separates the year-month fields, and colons (:) that separate the
day-time fields. You can also separate day and hour with a space.
Unsigned integer that specifies a number of years.
years can be up to 18 digits, or 16 digits if months is
the end-field. The maximum for the
leading-precision is specified within the interval
qualifier by either YEAR(18) or YEAR(16) TO MONTH.
Unsigned integer that specifies a number of months.
Used as a starting field, months can have up to 18 digits.
The maximum for the leading-precision is
specified by MONTH(18). Used as an ending field, the
value of months must be in the range 0 to 11.
Unsigned integer that specifies number of days. days
can have up to 18 digits if there is no end-field; 16 digits
if hours is the end-field; 14 digits if minutes is the
end-field; and 13-f digits if seconds is the end-field,
where f is the fraction less than or equal to 6. These
maximums are specified by DAY(18), DAY(16) TO
HOUR, DAY(14) TO MINUTE, and DAY(13-f) TO
SECOND(f).
Unsigned integer that specifies a number of hours. Used
as a starting field, hours can have up to 18 digits if
there is no end-field; 16 digits if minutes is the
end-field; and 14-f digits if seconds is the end-field,
where f is the fraction less than or equal to 6. These
maximums are specified by HOUR(18), HOUR(16) TO
MINUTE, and HOUR(14-f) TO SECOND(f). Used as
an ending field, the value of hours must be in the range
0 to 23.
Unsigned integer that specifies a number of minutes.
Used as a starting field, minutes can have up to 18
digits if there is no end-field; and 16-f digits if seconds
is the end-field, where f is the fraction less than or
equal to 6. These maximums are specified by
MINUTE(18), and MINUTE(16-f) TO SECOND(f). Used
as an ending field, the value of minutes must be in the
range 0 to 59.
Unsigned integer that specifies a number of seconds.
Used as a starting field, seconds can have up to 18
digits, minus the number of digits f in the fraction
less than or equal to 6. This maximum is specified by
SECOND(18-f, f). The value of seconds must be in
the range 0 to 59.9(n), where n is the number of digits
specified for seconds precision.
Unsigned integer that specifies a fraction of a second.
When seconds is used as an ending field, fraction
is limited to the number of digits specified by the
fractional-precision field following the SECOND
keyword.
Literals
227

Advertisement

Table of Contents
loading

Table of Contents