RDOHELP72.HLB  —  Field attr, missing-value-clause
    Specifies a numeric or character string literal that denotes that
    no value is stored in the field. When you retrieve or display the
    value, Oracle Rdb returns the contents of the MISSING_VALUE string
    or number.

  (B)0missing-value-clause =

    qqqqq> MISSING_VALUE IS qqqwqqq> fxd-pnt-num qqqqqwqqq>
                               mqqq> quoted-string qqqj

1  –  fxd-pnt-num

    A fixed-point number that Oracle Rdb uses to replace a retrieved
    null value.

    A fixed-point number always includes a decimal point, even when
    there are no digits to the right of the decimal point.

    For example, if a field contains dollar and cent values, you
    may want to use 0.00 as the missing value to preserve the value
    context when Oracle Rdb retrieves and displays null values. In this
    particular case, if you do not allow null values and you do not
    specify a missing value, Oracle Rdb fills the retrieved field with
    zeros.

    Specify a number that does not exceed the defined field length
    and include a decimal point.

2  –  quoted-string

    A character string that Oracle Rdb uses to replace retrieved null
    values. For example, you could specify a missing value of "Value
    not found" to replace null values. Specify a character string
    whose length does not exceed the length of the field. Enclose
    the string in single or double quotation marks ("string" or
    'string'). Ask for HELP on Value_expr for a complete description
    of the use of literal expressions.

3  –  Examples

    Example 1

    Define missing value for dates:

    DEFINE FIELD  STANDARD_DATE
            DESCRIPTION /* Universal date field */
            DATATYPE IS DATE
            MISSING_VALUE IS "17-NOV-1858 00:00:00.00"
            EDIT_STRING FOR DATATRIEVE IS 'DD-MMM-YYYY'.

    This definition defines a missing value for date fields to be the
    same as the base date and time for OpenVMS.

    Example 2

    Define missing values for numeric fields:

    DEFINE FIELD  SALARY
            DATATYPE IS SIGNED LONGWORD SCALE -2
            MISSING_VALUE IS 0.00
            EDIT_STRING FOR DATATRIEVE IS '$$$$,$$9.99'.

    This statement specifies "0.00" as the missing value for SALARY
    fields.

    Example 3

    Define missing values for text fields:

    DEFINE FIELD  ADDRESS_DATA
            DATATYPE IS TEXT SIZE 20
            MISSING_VALUE IS "Not available".

    When you retrieve a field whose value is missing, Oracle Rdb
    displays the string "Not available".
Close Help