Skip to main content
Version: Next

SQL EXPORT SELECTION

SQL EXPORT SELECTION ( aTable ; folderPath {; numFiles {; fileLimitSize {; fieldLimitSize}}} )

ParameterTypeDescription
aTableTableTable from which to export selection
folderPathTextPathname of export folder or "" to display folder selection dialog box
numFilesIntegerMaximum number of files per folder
fileLimitSizeIntegerMaximum size of Export.sql file (in KB)
fieldLimitSizeIntegerSize 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

SQL EXPORT DATABASE

Properties

Command number1064
Thread safe
Modifies variablesOK