Table Maintenance window fields  Working with key columns and duplicate entries

Chapter 3: Building Production Objects

Importing table objects

  1. To import a file from which to build table objects, click Import in the Table Maintenance window. Use this window to identify the ASCII text file to import into the table object or the tag/value table to load. You do not need to use the Table Import window to load a tag/value table.

    When importing an ASCII text file to build the data in a table, TRAN-IDE uses “Col#” as the name for each column where # is 1, 2, 3, etc., and uses “raw” as the datatype for each column. After importing the file, you can edit the column and change its name; however, you cannot change its datatype.

    NoteWhen you import a file into a table, the file’s contents overwrite any existing data in the table. Use the import option only on an empty table.

  2. Complete these options:

    Table 3-12: Table Import window keys

    Field (key)

    Description

    Import Type

    The choices in this box identify whether you are importing a tag/value table or an ASCII text file.

    TRAN-IDE Tag/Value Table

    Select this to import a table object that is in the tag/value format. You do not need to use the Table Import window to load a tag/value table into a table object.

    Custom

    Select this to use the contents of an ASCII text file to build the Table object.

    Separators

    These fields identify the file or table to import, as well as metadata. When a TRAN-IDE tag/value table is selected for the Import Type, the Table Path field is the only available option here.

    Table Path

    The path to and name of the file or tag/value table to import. By default, this field displays the default directory location as specified in the Table Object Directory window.

    Row Separator

    The character separating each row in the file. If the row separator is a printable character, type that character in this field, otherwise type the octal value for the row separator. If the rows are separated by both a carriage return and a line feed, type the octal value for a line feed in this field.

    Column Separator

    The character separating each column in the file. If the separator is a printable character, type that character in this field, otherwise type the octal value for the separator.

    If the columns in the file have open and close token separators instead of a single column separator, leave this field blank.

    If the columns in the file have both open and close token separators and a column separator, leave this field blank. You do not need to specify a column separator when using open and close token separators.

    This character is not included in the data loaded into the table.

    Open Token Separator

    The character at the beginning of each column’s data, for example, the bracket “[“ character in “[Dublin]”. This character is optional and need not be present in the file, but when it is present, there must also be a close token separator. This character is not included in the data loaded into the table.

    Close Token Separator

    The character at the end of each column’s data; for example, the bracket (]) character in “[Dublin]”. This character is optional and need not be present in the file, but when it is present, there must also be an open token separator.This character is not included in the data loaded into the table.

  3. Click Load. TRAN-IDE loads the file into the Table Maintenance window and attempts to build a table object with the data contained in the file.

  4. To save the table object, click Save or Save As.





Copyright © 2005. Sybase Inc. All rights reserved. Working with key columns and duplicate entries

View this book as PDF