Oracle Rdb provides support for DATATRIEVE, the Digital query
language. You can specify one or more of the following clauses:
Query header
Query name
Default value
Edit string
If you specify a DATATRIEVE attribute on a global field, you can
cancel that attribute for a particular relation, using the NO
qualifier. The NO qualifier of the dtr-clause is available when
you are changing a definition with the CHANGE FIELD or CHANGE
RELATION statement. The NO qualifier is not used with the dtr-
clause of DEFINE FIELD, DEFINE RELATION, and DEFINE VIEW.
1 – Format
(B)0[mdtr-clause =
qwq> [4mQUERY_HEADER[m [4mFOR[m qqwq> DTR qqqqqqqqwqq> IS qw> quoted-string qqwqwq>
x mq> DATATRIEVE qj mqqqqqq / <qqqqqqqqj x
tq> [4mNO[m [4mQUERY_HEADER[m [4mFOR[m qqwqq DTR qqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqu
x mq> DATATRIEVE qqqj x
tq> [4mQUERY_NAME[m FOR qqqqwq> DTR qqqqqqqqqwq> IS qq> quoted-string qqqqu
x mq> DATATRIEVE qqj x
tq> [4mNO[m [4mQUERY_NAME[m FOR qqqqwqq DTR qqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqu
x mq> DATATRIEVE qqj x
tq> [4mDEFAULT_VALUE[m FOR qwq> DTR qqqqqqqqqwq> IS qw> fxd-pnt-num qqqqwqu
x mq> DATATRIEVE qqj m> quoted-string qqj x
tq> [4mNO[m [4mDEFAULT_VALUE[m FOR qwq> DTR qqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqu
x mq> DATATRIEVE qqj x
tq> [4mEDIT_STRING[m FOR qqqwq> DTR qqqqqqqqqwq> IS qq> quoted-string qqqqu
x mq> DATATRIEVE qqj x
mq> [4mNO[m [4mEDIT_STRING[m FOR wq> DTR qqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
mq> DATATRIEVE qqj
fxd-pnt-num The default value returned to DATATRIEVE when
Oracle Rdb retrieves null values. A fixed-point
number is a number that always includes a
decimal point, even when there are no digits
to the right of the decimal point.
quoted-string A literal expression that Oracle Rdb returns to
DATATRIEVE.
2 – Examples
Example 1
The following example defines a field and specifies a DATATRIEVE
edit string for that field:
DEFINE FIELD MIDDLE_INITIAL
DATATYPE IS TEXT SIZE 1
EDIT_STRING FOR DATATRIEVE IS 'X.'.
The X represents any alphanumeric character. When you access
this field through DATATRIEVE, the field value is followed by a
period. The DATATRIEVE documentation set contains a complete list
of editing characters.
Example 2
The following example defines a DATATRIEVE query name for one
field and a DATATRIEVE query header for another:
DEFINE FIELD STATE
DATATYPE IS TEXT SIZE 2
QUERY_NAME FOR DATATRIEVE IS "ST".
DEFINE FIELD SEX
DATATYPE IS TEXT SIZE 1
VALID IF SEX = 'M' OR SEX = 'F'
QUERY_HEADER FOR DATATRIEVE IS "S"/"E"/"X".
These statements define DATATRIEVE query names and query headers
for the STATE and SEX fields. The header for the SEX field will
be one character wide, like the field itself.