SQL EXPORT SELECTION
SQL EXPORT SELECTION ( aTable ; folderPath {; numFiles {; fileLimitSize {; fieldLimitSize}}} )
Parameter | Type | Description | |
---|---|---|---|
aTable | Table | → | Table from which to export selection |
folderPath | Text | → | Pathname of export folder or "" to display folder selection dialog box |
numFiles | Integer | → | Maximum number of files per folder |
fileLimitSize | Integer | → | Maximum size of Export.sql file (in KB) |
fieldLimitSize | Integer | → | Size limit (in bytes) below which the contents of a Text, BLOB or Picture field are embedded into the main file |
Description
The SQL EXPORT SELECTION command exports in SQL format the records of the current selection of the 4D table designated by the aTable parameter.
This command is nearly identical to the SQL EXPORT DATABASE command. The file generated can be used directly by the SQL EXECUTE SCRIPT command in order to import data into another 4D database. The main difference between these two commands is that SQL EXPORT SELECTION only exports the current selection of aTable whereas SQL EXPORT DATABASE exports the entire database. Also, unlike the SQL EXPORT DATABASE command, this command does not work with external SQL databases. It can only be used with the main database.
Refer to the description of the SQL EXPORT DATABASE command for a detailed description of the functioning and parameters of these commands.
If the current selection is empty, the command does nothing. Note that in this case, the destination folder is not emptied.
If the export is carried out correctly, the OK variable is set to 1. Otherwise, it is set to 0.
Note: This command does not support Object type fields.
See also
Properties
Command number | 1064 |
Thread safe | ✗ |
Modifies variables | OK |