Previous Topic Next topic Print topic


TYPES

S pecifies the field types for the XDB Server table being created. The syntax is:

TYPES = field-type1 [, field-type2]. . .;

where field types are listed in the same order as corresponding field names, and delimited by commas. Valid field types are shown below. The two-letter designation defines the field type.

Symbol Field Type Symbol Field Type
CH[(n)] Char (Character) LB Long Varchar For Bit Data
CB[(n)] Character For Bit Data LG Long Vargraphic
DT[(p[s])] Date MN Money
DC Decimal SI Smallint (Small Integer)
SF Float (4-byte) TM Time
FL Float TS Timestamp
GR Graphic VC[(n)] Varchar (Variable Character)
LI Integer VB[(n)] Varchar For Bit Data
LV Long Varchar VG[(n)] Vargraphic
Note:

When importing ASCII files, you can specify a data type of JU (for Julian) to import Julian dates into XDB Server date fields. The system will read dates in the format yyddd (where ddd is the number of days since the beginning of the year) and write them in the regular XDB Server date format.

When specifying fields as DECIMAL, CHARACTER, VARCHAR, CHAR-FOR-BIT-DATA, VARCHAR-FOR-BIT-DATA, GRAPHIC and VARGRAPHIC, include the field length or precision and scale in parentheses immediately after the letter specifying the data type.

TYPES is a required Batch Import command for every transaction.

For example:

TYPES = ch(10),dc(10,2),dt,si;

sets the field types in the imported table to:

Previous Topic Next topic Print topic