Previous Topic: DurationsNext Topic: Date/time Arithmetic


Expansion of Labeled-duration

The expanded parameters of labeled-duration specify an interval of time in a unit of measure ranging from microseconds to years.

Syntax

Expansion of labeled-duration

►►─┬─ aggregate-function ────────────┬───┬─ YEAR ─────────┬───────────────────►◄
   ├─┬───────────────┬─ column-name ─┤   ├─ YEARS ────────┤
   │ ├─ table-name. ─┤               │   ├─ MONTH ────────┤
   │ └─ alias. ──────┘               │   ├─ MONTHS ───────┤
   ├─ literal ───────────────────────┤   ├─ DAY ──────────┤
   ├─ host-variable ─────────────────┤   ├─ DAYS ─────────┤
   ├─ value-expression ──────────────┤   ├─ HOUR ─────────┤
   └─ dynamic-parameter-marker ──────┘   ├─ HOURS ────────┤
                                         ├─ MINUTE ───────┤
                                         ├─ MINUTES ──────┤
                                         ├─ SECOND ───────┤
                                         ├─ SECONDS ──────┤
                                         ├─ MICROSECOND ──┤
                                         └─ MICROSECONDS ─┘
Parameters
aggregate-function

Specifies the aggregate function that represents the value in the labeled duration. For expanded aggregate-function syntax, see Aggregate-function.

column-name

Specifies the column that represents the value in the labeled duration.

table-name.

Specifies the table, view, procedure or table procedure that includes the named column. For expanded table-name syntax, see Expansion of Table-name.

alias.

Specifies the alias for the table, view, procedure or table procedure that includes the named column.

literal

Specifies the literal that represents the value in the labeled duration. For expanded literal syntax, see Expansion of Literal.

host-variable

Specifies the host variable that contains the value in the labeled duration. For expanded host-variable syntax, see Expansion of Host-variable.

value-expression

Specifies the value expression that represents the value in the labeled duration. For expanded value-expression syntax, see Expansion of Value-expression.

dynamic-parameter-marker

Specifies that the value in the labeled-duration statement is supplied as a dynamic parameter. For expanded dynamic-parameter-marker syntax, see Expansion of Dynamic-parameter-marker.

YEAR / YEARS

Indicates that the unit of measure of the duration is years.

MONTH / MONTHS

Indicates that the unit of measure of the duration is months.

DAY / DAYS

Indicates that the unit of measure of the duration is days.

HOUR / HOURS

Indicates that the unit of measure of the duration is hours.

MINUTE / MINUTES

Indicates that the unit of measure of the duration is minutes.

SECOND / SECONDS

Indicates that the unit of measure of the duration is seconds.

MICROSECOND / MICROSECONDS

Indicates that the unit of measure of the duration is microseconds.