Explanation Appreciated... but still a bug!
Dear Agraham,
Thanks for the explanation and if the instruction was SaveTXT I would say your reply was all that was needed.
But if you try this:
LOAD DATA INFILE '/TEST.csv' INTO TABLE test
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r'
(COL1)
...with any database that supports the LOAD INFILE of a CSV file you get a corrupted database field.
There is a much broader concept of files with the type of CSV. While the debate of CSV standards still persist, it is usually accepted that fields are separated by commas and text is enclosed in quotes. CSV also implies portability in that programs supporting these files are expecting numbers and strings. Try double clicking on the SaveCSV file and (if you have it) Microsoft Excel pops open and low and behold, the first field is corrupted.
The SaveCSV has the commas, but not the quotes (these days quotes are mostly optional, but not to older programs) and the first record gets a BOM!
One would hope that a future release would have the option (as does B4PPC FileOpen) to specify ASCII encoding and optional quotes.
If anyone else needs ASCII CSV Table output, the attached works just fine.
Regards
Ed Sharp