Missing data values are stored internally in a special form, and you may
enter and recall these values by using the NULL keyword.
| Type |
Declaration |
Character |
CHAR or CHARACTER (3 types) TEXT
NLSCHAR or NLSCHARACTER (3 types) NLSTEXT
|
User Interpreted (Byte Stream) |
MULTIMEDIA or BULK
|
Date |
DATE (9 formats) TIME (9 formats) MICROTIMESTAMP (9 formats) |
Decimal |
DECIMAL or DEC (up to 38 digits) DOLLAR (up to 13 digits)
|
Float |
REAL FLOAT LONGFLOAT or DOUBLE PRECISION
|
Integer |
INTEGER or INT LONGINTEGER SHORTINTEGER or SMALLINT |
Character Data
With Empress, you may store character data in fixed-length fields using
one of three ways:
- Store only printable characters and strip leading and trailing blanks from data you enter by using
CHAR or CHARACTER type 1
- Store only printable characters and preserve leading and trailing blanks from data you enter by using
CHAR or CHARACTER type 2
- Store any ASCII character except
NULL by using type 3
Text Data
The TEXT data type will store character data varying from
several characters to many pages, using only as much storage as is
needed for the data. This is an extremely powerful and flexible way of
storing a wide variety of text passages, including descriptions,
abstracts, comments, and word processor output.
National Language Support (NLS) Character Data
The NLSCHARACTER data type is essentially the same as the CHARACTER
with the exception of characters being stored in 8-bit.
National Language Support (NLS) Text Data
The NLSTEXT data type is essentially the same as TEXT with the exception of
characters being stored in 8-bit.
Multimedia Data
Empress stores binary information as MULTIMEDIA or
BULK data. This data type allows you to store data values of
any length or format, such as those used to represent voice or graphical
data. Empress dynamically allocates space when storing bulk data.
Date Data
The DATE data type stores dates. There are nine date data formats:
Table 2-3: Empress DATE Data Type Formats
| Type |
Format |
Year Range |
Example
|
|
|
|
|
| 0 |
yyyymmdd
|
0000-9999 |
20020627 |
| 1 |
dd aaaaaaaaa yyyy |
0000-9999
|
27 June 2002 |
| 2 |
aaaaaaaaa dd, yyyy |
0000-9999 |
June 27, 2002 |
| 3 |
mm/dd/yy |
nn00-nn99 * |
06/27/02
|
| 4 |
dd/mm/yy |
nn00-nn99 * |
27/06/02 |
| 5 |
dd aaa yy |
nn00-nn99 * |
27 Jun 02 |
| 6 |
aaa dd, yy |
nn00-nn99 * |
Jun 27, 02 |
| 7 |
mm/dd/yyyy |
0000-9999 |
06/27/2002 |
| 8 |
dd/mm/yyyy |
0000-9999
|
27/06/2002 |
*
nn is defined by the Empress
system variable MSDATELIMIT, the value of which is assigned by the user
to indicate the preferred century for entering dates.
Time Data
Time data is stored as TIME. To store time, you may use one of
nine formats:
| Type |
Output Style |
|
|
| 0 |
20030828145615 |
| 1 |
28 August 2003 14:56:15 |
| 2 |
August 28, 2003 14:56:15 |
| 3 |
08/28/03 14:56:15 |
| 4 |
28/08/03 14:56:15 |
| 5 |
28 Aug 03 14:56:15 |
| 6 |
Aug 28, 03 14:56:15 |
| 7 |
08/28/2003 14:56:15 |
| 8 |
28/08/2003 14:56:15 |
MicroSecond Timestamp Data
The MICROTIMESTAMP data type stores TIME plus microseconds information.
The nine different MICROTIMESTAMP styles are shown below:
| Type |
Output Style |
|
|
| 0 |
20070828145615234599 |
| 1 |
28 August 2007 14:56:15.234599 |
| 2 |
August 28, 2007 14:56:15.234599 |
| 3 |
08/28/07 14:56:15.234599 |
| 4 |
28/08/07 14:56:15.234599 |
| 5 |
28 Aug 07 14:56:15.234599 |
| 6 |
Aug 28, 07 14:56:15.234599 |
| 7 |
08/28/2007 14:56:15.234599 |
| 8 |
28/08/2007 14:56:15.234599 |
Decimal Data
Decimal numbers are stored as DECIMAL or DEC. You can
specify the number of digits and decimal places you need for your data.
You may store up to 38 digits.
Dollar Data
Dollar and currency are stored as DOLLAR. When using this
function, you may store any amount up to 13 digits and use one of three
different formats:
| Dollar Type |
Format |
|
|
| 1 |
$1,234.00 |
| 2 |
$****1,234.00 |
| 3 |
1234.00 |
You can use an Empress variable to control the currency, cents, and the
thousands' separator (i.e., DM1,000.00).
Floating Point Data
Floating point numbers are stored as:
REAL
FLOAT
LONGFLOAT or DOUBLE PRECISION
With FLOAT, you can specify the number of decimal places. Use
LONGFLOAT for very high precision.
Integer Data
Integer numeric values are stored as:
INTEGER or INT
SHORTINTEGER or SMALLINT
LONGINTEGER
Using LONGINTEGER, you can store twice the number of
digits than with INTEGER and four times the number
of digits than with SHORTINTEGER.
|