|
LOAD (Short Name: LOA)
|
|
| · | It does not check data types; therefore, invalid data will be loaded as null values into columns; no error messages about this conversion are displayed.
|
| · | It does not display error messages when columns must be truncated, or when excess data exists on any line.
|
| · | It does not echo data to the screen regardless of the setting for SET ECHO.
|
| · | The carriage return/line feed characters define the end of the line for a given row; the maximum row size is 4096 characters.
|
| · | The data cannot include variables.
|
| · | The data cannot include comments.
|
| · | The carriage return/line feed characters define the end of the line for a given row; the maximum row size is 4096 characters.
|
| · | The data cannot include variables.
|
| · | The data cannot include comments.
|
| · | You must specify the name of each column of the table to be loaded, and the starting and ending position of its data in the line, which is specified in the USING clause of this command.
|
|
For these data types...
|
Use this format for data-block
|
|
All data types except BIT, BITNOTE, LONG VARBIT, and VARBIT
|
'string' or value
|
|
BIT, BITNOTE, LONG VARBIT, LONG VARCHAR, VARBIT, and VARCHAR
|
['filename.ext'] or ['filename.ext', filetype, offset, length] Note: When you use VARCHAR, the filetype is always TXT. When you use VARBIT, BIT, and BITNOTE, filetype refers to the standard graphical file types.
|
| · | Do not embed commas within entries for CURRENCY, DATE, DATETIME, DOUBLE, INTEGER, NUMERIC, or REAL data types. R:BASE automatically inserts commas and the current currency symbol.
|
| · | When values for CURRENCY, DOUBLE, NUMERIC, or REAL or data types are decimal fractions, you must enter the decimal point. When values are whole numbers, R:BASE adds a decimal point for you at the end of the number. R:BASE adds zeros for subunits in whole currency values. For example, using the default currency format, R:BASE loads an entry of 1000 as $1,000.00.
|
| · | When values for NOTE or TEXT data types contain commas, you can either enclose the entries within quotes, or use SET DELIMIT to change the default delimiter (comma) to another character.
|
| · | When values for NOTE or TEXT data types contain single quotes ('), and you are using the default QUOTES character ('), use two single quotes ('') in the text string. For example, 'Walter Finnegan''s order.'
|
| · | When a value you specify for a column is not the same data type as the column's data type, R:BASE displays an error message and you need to re-enter the entire row.
|
| · | When values for NOTE or TEXT data types exceed the maximum length of a column, R:BASE truncates the value and adds it to the table. A message is displayed that tells you which row has been truncated.
|
|
Elements in an ASCII File
|
Requirement
|
|
INTEGER data types
|
Items of data to be loaded into columns with INTEGER data types cannot contain internal commas unless the item is enclosed in quotes. The default QUOTES character in R:BASE is a single quote ('); if your ASCII file uses double quotes ("), change the QUOTES setting before you load the file. If the file does not have quotes around the integer values containing commas, you must edit the ASCII file to remove any commas from the integer values, or enclose each integer value in quotes.
|
|
Embedded punctuation
|
Items of data containing ampersands, commas, embedded blanks, plus signs, equal signs, or semicolons must be enclosed in quotes if they are to be loaded into columns with a TEXT or NOTE data type. The default QUOTES character in R:BASE is a single quote ('); if your ASCII file uses double quotes ("), change the QUOTES setting before you load the file.
|
|
Embedded quotes
|
Items of data requiring quotes can also contain embedded quotes. For example, the item 'Basic' Keyboard contains both a blank space and embedded quotes. Using single quotes ('), which is the default QUOTES setting, to add enclosing quotes, the item would looks like this: '''Basic'' Keyboard'
|
|
Currency
|
R:BASE automatically adds a currency symbol, commas, and zeros for currency units. For example, using the default currency format, R:BASE loads an entry of 1000 as $1,000.00. Negative currency values loaded into
|
|
Dates
|
The SET DATE sequence command sets the sequence for the date-dates in the file are loaded if the dates match the current date sequence established with the SET DATE command.
|
|
Computed columns
|
If the table being loaded has computed columns and the file contains values for the computed columns, R:BASE tries to load the computed column's value from the file into the column following the computed column. This results in an error because the data type of the next column might not be the correct data type, or the file will have too many values for the table because R:BASE does not load the computed column's value from the file.
|
|
Rules processing
|
Unless you run the SET RULES OFF command before loading the file, rules processing is in effect. When an incoming data item violates a rule, R:BASE does not load the row. Instead, R:BASE displays the message for the rule that has been violated. To see the data that causes a rule violation, set ECHO on when loading a table and use the [Pause] key to stop the screen from scrolling when the rule violation occurs.
|
| · | Enter column values in the order that columns are defined in the table, and separate the values with a delimiter character. The default delimiter character is the comma.
|
| · | You can enter up to 75 characters on a single line. If a row is longer than 75 characters, continue on to the next line by typing past the end of the current line or by entering a plus (+) sign at any point on the current line. The plus sign must be the last entry on the line. The new line will begin with a +> prompt to indicate the continuation of the current line. If you are using this form of the LOAD command in a command file, you must use a + to continue on the next line; the lines will not automatically wrap.
|
| · | For other requirements on loading data, see "Loading from an ASCII File" earlier in this entry.
|