Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ParameterDefaultValid Values
AppendFilefalsetrue, false, clear
BinaryFileDir Directory path for data files when BinaryFormat is set to File
BinaryFormatDon't ExportDon't Export, Size, Value, Hex, Base64, File
BooleanFalseFormatfalsefalse, no, 0, off
BooleanTrueFormattruetrue, yes, 1, on
CLOBFileDir Directory path for data files when CLOBFormat is set to File
CLOBFormatValueDon't Export, Size, Value, File
CsvColumnDelimiter\t (TAB) 
CsvIncludeColumnHeadertruetrue, false
CsvColumnHeaderIsColumnAliastruetrue, false
CsvIncludeSQLCommandDon't IncludeDon't Include, Top, Bottom
CsvRemoveNewlinesfalsetrue, false
CsvRowCommentIdentifier  
CsvRowDelimiter\n\n (UNIX/Linux/Mac OS X), \r\n (Windows)
DateFormatyyyy-MM-ddSee valid formats in KLART: Changing the Data Display Format document
DecimalNumberFormatUnformattedSee valid formats in KLART: Changing the Data Display Format document
DestinationFileFile
EncodingUTF-8 
ExcelColumnHeaderIsColumnAliasfalsetrue, false
ExcelFileFormatbinarybinary (Binary Excel) or ooxml (Excel 2007)
ExcelIncludeColumnHeadertruetrue, false
ExcelIncludeSQLCommandfalsetrue, false
ExcelIntroText Any description
ExcelSheetName Used when exporting to excel. Sets the name of exported excel sheet.
ExcelTextOnlyfalsetrue, false
ExcelTitle Any title
Filename REQUIRED  
FormatCSVCSV, HTML, XML, SQL, XLS, JSON
HtmlIncludeSQLCommandfalsetrue, false
HtmlIntroText  Any description
HtmlTitle  Any title
JSONStyleArrayArray, Rows
NumberFormatUnformattedSee valid formats in KLART: Changing the Data Display Format document
QuoteDuplicateEmbeddedtruetrue, false (quote char is the same as QuoteTextData)
QuoteTextDataNoneNone, Single, Double
Settings The path to an XML file containing all settings
ShowNullAs(null) 
SqlBeginIdentifier Character to use to begin a quoted identifier. Note! To specify a double-quote, you must duplicate it since double-quote is also used to enclose the parameter value.
SqlBlockBeginDelim String to use to begin an SQL block when exporting complex DDL statements using the @ddl command.
SqlBlockEndDelim String to use to end an SQL block
SqlDelimitedIdentifierstruetrue, false
SqlEndIdentifier Character to use to end a quoted identifier. Note! To specify a double-quote, you must duplicate it since double-quote is also used to enclose the parameter value.
SqlIncludeCreateDDLfalsetrue, false
SqlIncludeSQLCommandDon't IncludeDon't Include, Top, Bottom
SqlQualifier Qualifier to use when qualifying table names. If not set, DbVisualizer tries to determine the schema and use it as the qualifier.
SqlQualifyObjectNametruetrue, false
SqlRowCommentIdentifier-- 
SqlSeparator;Statement separator character.
TableName Can be set if DbVisualizer cannot determine the value for the ${dbvis-object}$ variable
TimeFormatHH:mm:ssSee valid formats in KLART: Changing the Data Display Format document
TimeStampFormatyyyy-MM-dd HH:mm:ss.SSSSSSSee valid formats in KLART: Changing the Data Display Format document
XmlIncludeSQLCommandfalsetrue, false
XmlIntroText  Any description
XmlStyleDbVisualizerDbVisualizer, XmlDataSet, FlatXmlDataSet

Here are a few examples using some of these settings.

Automatic table name to file mapping

This example shows how to make the filename the same as the table name in the select statement. The example also shows several select statements. Each will be exported in the SQL format. Since the filename is defined to be automatically set, this means that there will be one file per result set and each file is named by the name of its table.

...

Note

There must be only one table name in a select statement in order to automatically set the filename with the ${dbvis-object}$ variable, i.e if the select joins from several tables or pseudo tables are used, you must explicitly name the file.

The ${dbvis-object}$ variable is not substituted with a table name if using the AppendFile="true/clear" parameter.

Multiple results to a single file

This example shows how all result sets can be exported to a single file. The AppendFile parameter supports the following values.

...

Code Block
@export on;
@export set filename="c:\Backups\alltables.sql" appendfile="clear" format="sql";
select * from Orders;
select * from Products;
select * from Transactions;
@export off;

Using predefined settings

If you save settings when exporting a table or a schema, you can use the Settings parameter to reference the settings file.

Code Block
@export on;
@export set settings="c:\tmp\htmlsettings.xml" filename="c:\Backups\${dbvis-object}$";
select * from Orders;
select * from Products;
select * from Transactions;
@export off;

Limit the number of exported rows

You can use the @set maxrows command in combination with the @export command to override the Max Rows field value in the SQL Commander tab toolbar.

...