Tony,Does it have to be a TXT report or is it to unload data using a ";" for
the delimiter.If it is to merely unload data. Consider creating a VIEW to
select the data you want to
export. You could also CREATE and populate a Temporary Table. Then used GATEWAY
commandto unload the data.
|
CSV (Comma Separated Values)
| | | |
|
CSV (Comma Separated Values)
| | | |
Syntax: GATEWAY EXPORT CSV filename.csv +SELECT clause +OPTION COL_NAMES value
+|QUALIFIER symbol +|SEPARATOR symbol +|REC_SEP value +|SHOW_PROGRESS value
+|MESSAGES value +|ACTION value +|MERGE_DATA value +|SPECIFICATION_FILE_NAME
filename filename.csvThis parameter defines the file name of target file with
exported data as Comma Separated Values format. File extension must be csv.
SELECT clauseSpecifies and limits rows of data. For more information, see the
"SELECT" command. OPTION COL_NAMESIf ON, will add a first row with column
names. If OFF, will only export data. Available Parameters: ON / OFF
QUALIFIERChanging the value of this option you can define any qualifier for
fields in the target Comma Separated Values text file. The popular value is
Quotes (") but you can define any custom character you wish. SEPARATORDefines
the separator of fields in target text file. The popular values are Semicolon
(;), Comma (,), Space (#32) but you can define any other character if you wish.
If the pipe character is needed to be specified as the separator, then specify
the keyword PIPE. BLANK_IF_ZERO Available Parameters: ON / OFF If ON, will
export zero values as blank values. If OFF, will export zero values as zero
values. The default is set to OFF. REC_SEPDefines the separator between lines
in the target text file. The popular value is CRLF (#13#10) or CR(#13) but you
can define any other custom string. Available Parameters: CR / LF / CRLF
SHOW_PROGRESSIndicates whether to display status dialog during export process.
Set SHOW_PROGRESS to ON if you wish to show an animated status dialog during
the export process. Set SHOW_PROGRESS to OFF if you wish to export data without
animated status dialog. Available Parameters: ON / OFF MESSAGESIf ON, during
export process some messages will be displayed such as -ERROR- messages, if
any. If OFF, the entire export process will be in "silent" mode. Available
Parameters: ON / OFF ACTIONYou can define the default action which will be
processed after export is complete, for example, to open the target export file
in view/edit mode or send this exported file by email as attachment. Available
Parameters: OPENVIEW MERGE_DATAIf ON, the exported data will be added to the
specified file, if exists. The default is set to OFF. Available Parameters: ON
/ OFF SPECIFICATION_FILE_NAME This parameter is used to load a prepared
specification with all pre-defined settings for exporting. The export must be
performed once using the graphic user interface "Export Wizard" and saved using
the "Specifications.." button. The specifications will be stored in a file with
the .RGW file extension. Example: GATEWAY EXPORT CSV D:\TEMP\EMPLOYEE.CSV
+SELECT * FROM EMPLOYEE OPTION COL_NAMES ON +|QUALIFIER " |SEPARATOR , |REC_SEP
CRLF +|SHOW_PROGRESS ON |ACTION OPENVIEW GATEWAY EXPORT TAB G:\Durgin.txt
+SELECT * FROM QuoteTable + OPTION COL_NAME ON | SEPARATOR PIPE
All of this including the Selection input TABLE or View, Write of the .RBG
file, andexecution of the GATEWAY command can be encapsulated in a
STORED_PROCEDURE.
I am a big fan of using VIEWS over TEMPORARY TABLES.
Jim Bentley,
American Celiac Society
1-504-737-3293
From: Tony IJntema <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Thursday, June 18, 2015 5:31 AM
Subject: [RBASE-L] - How to use a semicolon instead of comma in a TXT report
I have to create a txt report
The fields need to be separated by a semicolon instead of a comma
Is this possible?
I have tried to change the settings but no effect
Tony