8. SQL Statements : COPY : Filename Specification for COPY : VMS File Types for COPY
 
Share this page                  
VMS File Types for COPY
File type can be specified using the optional type parameter. Type must be one of the values listed in the following table.
Type
Record Format
Record Attributes
text
Variable length
Records delimited by carriage return
binary
Fixed length
None
variable
Variable length
None
If type is omitted, COPY determines the file type as follows:
If all fields in the file are character types (char, text, varchar), and the final delimiter is nl, csv, or ssv, COPY creates a text file.
If the file contains variable length records, its file type is variable. Variable length records occur if one or more fields are stored as varchar(0).
If none of the preceding conditions apply, COPY creates a binary file.
If type is specified, the contents of the file must be in accordance with these rules. If it is not, COPY creates the data file according to the preceding rules.