This section of the Import window is where you specify the name of the XDB Server Table that is to receive your imported data.
You can import data into an existing XDB Server table, or create a new table and define its table definition structure right
on the Import window.
- Table
- Enter the name of the XDB Server table that will receive your data.
To import data to an existing XDB Server table, use the
Browse button to select a table. Check the
Replace Data checkbox if you want the imported data to replace existing data in the table. To append the imported data to the existing
data in the table, be sure the
Replace Data checkbox is unchecked.
To use the imported data to create a new XDB Server table, check the
Create Table checkbox and specify the items in the Table Definition Grid at the bottom of the window.
- Create Table
- Check this box when you want to use the imported data to create a new XDB Server table.
- Replace Data
- Check this box when importing data to an existing XDB Server table and you want to replace the existing data. When this option
is checked, all data in the existing table is deleted and is replaced in its entirety with the new data coming from the file
you are importing.
- Table Definition Grid
- When importing to an existing XDB Server table, this area of the screen shows the table structure.
When creating a new XDB Server table to hold your imported data, SQLWizard provides a suggested table definition. You can
make changes as desired.
- Name (Column Name)
- If you do not specify column names when importing to a new table, Import attempts to read the field names from the source
file (if the
Heading checkbox is marked or the format indicates that field names are in the first record). Otherwise, the import program provides
default names (Field1, Field2, ... Fieldn).
- Type (Field Type)
- When importing data to a new XDB Server table, you must specify field types. You do not necessarily need to use the same data
types as in the source file. For example, you can redefine a NUMERIC field to be a CHARACTER field, but you should not redefine
a CHARACTER field that contains non-numeric data as SMALLINT, INTEGER, OR FLOAT.
- Length (Field Length)
- If you choose to specify field lengths, you can specify the lengths of CHARACTER, VARCHAR, GRAPHIC, VARGRAPHIC, CHAR FOR BIT
DATA, and VARCHAR FOR BIT DATA fields. You must also specify the precision and scale for DECIMAL fields (default is 5,0).
Other field lengths refer to storage length and are provided automatically.
- Null (Null Values)
- Specify the null permission of the field. Indicate
Yes if nulls are allowed,
No if nulls are not allowed, and
DEF if nulls should be converted to the default value for the field. The
DEF option is the same as NOT NULL WITH DEFAULT.
- Pic
- Indicate if you want to use the mask specified on the
Format tab in Options when importing MONEY, DECIMAL, DATE, and TIME fields:
- Yes: Use the Options mask.
- No: Do not use the Options mask. Instead, use the following default format masks:
Type
|
Default Picture
|
Time
|
hh:mm:ss
|
Date
|
mm/dd/yyyy
|
Decimal
|
<sign><digits>[.<digits>][E[+-]<digits>]
|
Money
|
<sign><digits>[.<digits>][E[+-]<digits>]
|
|
where:
<sign> includes any combination of + - $ >=
|
|
<digits> are 0 through 9; also comma (,) if to the left of the decimal place.
|
- Src Off (Source Offset)
- For importing fixed-format ASCII files. Should indicate the starting column number for each field in the source file. The
system suggests offsets based on the white space found in the heading row of the source file.
- Src Len (Source Length)
- For importing fixed-format ASCII files. Should indicate the length of each data field. You might have to edit the Src Len
column to correctly describe the source file.
When importing a fixed-format ASCII file to a new table, you must specify field lengths or use the HEADING= and SPACES= statements
in your batch file. If the import program finds HEADING=Y and SPACES=1 or more, it will be able to determine the field lengths.