Hola, extracto de la ayuda de Xharbour sobre este comando.
[quote:2jkj52df]
DELIMITED
The DELIMETED option specifies the target file as a delimited ASCII file where field values are separated with a comma and Character values are enclosed with a delimiting character. The default delimiter for Character values is a double quotation mark.
DELIMITED WITH BLANK | TAB | PIPE
When the delimiter is specified as BLANK, field values in the new created ASCII text file are separated by one space and character fields are not enclosed in delimiters. Alternatively, the delimiting character between field values can be specified as TAB (Chr(9)) or PIPE (Chr(124)).
DELIMITED WITH
The WITH option specifies the delimiting character to enclose values of Character fields in. can be specified as a literal character or a character expression enclosed in parentheses. can also be specified as an array with two elements: { , }. If this option is used, the array must be enclosed in parentheses. It defines the delimiting characters for field values of type "C" and the delimiters between field values.
Important: If the DELIMITED WITH option is used in the COPY TO command, it must be placed as the last option in the command.
// The example creates different delimited ASCII files.
PROCEDURE Main
USE Address NEW
// Creates a regular DELIMITED ASCII file
COPY TO Test.txt DELIMITED
// Uses Chr(9) as field delimiter
COPY TO Test1.txt DELIMITED WITH TAB
// Uses "|" as field delimiter
COPY TO Test2.txt DELIMITED WITH PIPE
// Encloses character values in single quotes and separates
// fields with Chr(255)
COPY TO Test3.txt DELIMITED WITH ( {"'", Chr(255) } )
USE
RETURN
[/quote:2jkj52df]
un punto importante que dice que la calusula DELIMITED debe ser la ultima en usarse
trata de usarla de esta forma, para saber como resulta
Copy To &NomArch SDF DELIMITED WITH ( {"," chr(59)} )
** chr(59) = ";"
espero que sirva
↧