Page History
...
Here is a basic example:
Code Block | ||
---|---|---|
| ||
@export on; @export set filename="c:\Backups\Orders.csv"; select * from Orders; @export off; |
...
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.
Code Block | ||
---|---|---|
| ||
@export on; @export set filename="c:\Backups\${dbvis-object}$" format="sql"; select * from Orders; select * from Products; select * from Transactions; @export off; |
...
- true
The following result sets will all be exported to a single file - false
Turn off the append processing - clear
Same as the true value but this will in addition clear the file before the first result set is exported
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; |
...
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; |
...
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.
Code Block | ||
---|---|---|
| ||
@set maxrows 10; @export on; @export set filename="c:\Backups\alltables.sql" format="sql"; select * from Orders; select * from Products; select * from Transactions; @export off; |
...
Overview
Content Tools