Friday, February 27, 2026
Tip of the Day: Specifying a Column List with LOAD AS CSV
Product: R:BASE 11
Build: 11.0.3.20226 or higher
Section: Commands
Keywords: LOAD, CSV, Column List, USING
The LOAD ... AS CSV command has been enhanced to allow specification of
a *column list* in the destination table.
This enhancement provides greater flexibility when importing CSV data
into R:BASE tables. The destination table no longer needs to conform to
the physical column order of the data in the file. In other words, the
column order within the CSV file does *not* need to match the column
order of the target table.
*Syntax:*
LOAD <TableName> FROM <FileName> AS CSV USING <ColumnList>
*Example:*
The following example loads only the EmpCity and EmpState columns in the
Employee table from the file EmpCityState.csv:
LOAD Employee FROM EmpCityState.csv AS CSV USING EmpCity, EmpState
In this example:
* Only the specified columns (EmpCity, EmpState) are populated.
* The order of data within the CSV file must correspond to the order
listed in the USING clause.
* Other columns in the Employee table remain unchanged or are assigned
NULL values (depending on table structure and defaults).
*How AS CSV Works*
The AS CSV parameter instructs R:BASE to interpret the source file as a
comma-separated values (CSV) file. Table rules and constraints are
checked for the data load.
*Limitations of AS CSV*
When using AS CSV, the following limitations apply:
* Data types are not validated. Invalid data will be loaded as NULL
values.
* Error messages are not displayed when column data must be truncated
or excess data exists on a line
* Data does not echo to the screen, regardless of the SET ECHO setting.
*File Format Requirements*
The source data must look like the format generated by UNLOAD DATA AS
CSV. The CSV file must adhere to the following rules:
* Carriage return/line feed (CR/LF) characters define the end of each row.
* Maximum row size is 32,768 characters.
* Data cannot include variables.
* Data cannot include comments.
The Support Team
R:BASE Technologies, Inc.
https://www.rbase.com
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/rbase-l/6b9f0e78-aeaf-a59e-a624-aac3af4c0e7e%40rbase.com.