6. QUEL and EQUEL Statements : Copy Statement—Copy Data : Copy Statement Parameters : Data File Format and Table Format
 
Share this page                  
Data File Format and Table Format
Table columns need not be the same data type or length as their corresponding entries in the data file. For example, numeric data from a table can be stored in char(0) or varchar(0) fields in a data file. The copy statement converts data types as necessary. When converting data types (except character to character), copy checks for overflow. When converting from character to character, copy pads character strings with blanks or nulls, or truncates strings from the right, as necessary.
When copying from a table to a file, you must specify the column names in the order you want the values to be written to the file. The order of the columns in the data file can be different from the order of columns in the table. When copying from a file to a table, you must sequence the table columns according to the order of fields in the data file.