NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
E-32
Examples—EXTEND
If the range contains fields to the left of the fields in date-time-expression,
the additional fields receive values based on the current date or time. If the result is
not a valid DATETIME value, an SQL error is generated.
If the range contains fields to the right of the fields in date-time-expression, the
additional fields are initialized as follows:
Examples—EXTEND
In this example, the fields DAY, HOUR, MINUTE, SECOND, and FRACTION to
the right of MONTH are initialized to 01 (for DAY), 00 (for HOUR, MINUTE, and
SECOND) and 000000 (for FRACTION):
EXTEND (DATETIME "1994-11" YEAR TO MONTH , YEAR TO FRACTION)
The function returns the following value:
1994-11-01:00:00:00.000000
In this example, the field YEAR to the left of MONTH is initialized to the current
year. The HOUR and MINUTE fields to the right of MONTH are initialized to 0:
EXTEND ( DATETIME "11-24" MONTH TO DAY , YEAR TO MINUTE )
In 1994, the function returns the following value:
1994-11-24:00:00
EXTENT File Attribute
EXTENT is a Guardian file attribute that sets the size of the extents (units of contiguous
disk space) that will be allocated for a file or a partition of a file. EXTENT applies to
key-sequenced, relative, and entry-sequenced tables and to indexes.
EXTENT is set when a file or partition is created. Each partition of a partitioned file has
its own EXTENT attribute that can differ from the EXTENT attribute for other
partitions of the file. You can specify a single extent size for each extent in the file or
Field
Initial
Value
MONTH 01
DAY 01
HOUR 00
MINUTE 00
SECOND 00
FRACTION 000000