SQL/MX 2.x Reference Manual (H06.04+)

Introduction
HP NonStop SQL/MX Reference Manual540440-003
1-28
Selecting or Changing Data
If you attempt to select data from a FRACTION-only column, the value is returned as
the CHAR data type consisting of a string of '#' characters with the same display
length as the length of the column.
See Selecting DATETIME Columns in SQL/MP Tables on page 6-25.
Inserting or Updating Any DATETIME Column
NonStop SQL/MX supports inserting into or updating any columns with the DATETIME
data type in SQL/MP tables except those consisting of FRACTION only. Use a special
SQL/MX DATETIME literal to insert into or update a DATETIME column. The literal is
specified:
DATETIME 'datetime' [start-field TO] end-field
See Inserting Into or Updating Any SQL/MP DATETIME Column on page 6-64.
INTERVAL Data
SQL/MP INTERVAL values represent durations of time in year-month units (years and
months), in day-time units (days, hours, minutes, seconds, and fractions of a second),
or in subsets of those units.
Year-Month Interval
Specify a year-month duration:
INTERVAL start-ym [(digits)] [TO end-ym]
The start-ym and end-ym specify a range of logically contiguous fields:
YEAR
MONTH
Day-Time Interval
Specify a day-time duration:
INTERVAL start-dt [(digits)] [TO end-dt]
The start-dt and end-dt specify a range of logically contiguous fields:
DAY
HOUR
MINUTE
SECOND
FRACTION [(precision)]
The start-dt must precede the end-dt. The FRACTION field can include the
precision option only if the FRACTION field is the end-dt.
Selecting Any INTERVAL Column
You can select data from any SQL/MP INTERVAL columns with a start field of YEAR
through SECOND. All SQL/MP INTERVAL data types that have a start field of YEAR