Zoomed Image

AMSX Scripting Language - Command : EmitSqlToFiles

Summary

Write SQL query results to files in a folder, one file per row

Description

Executes the SQL statement and writes each row to a file in the target folder. The first column of the query must be the filename and the second column must be the file content. If two rows produce the same filename the later row overwrites the earlier one. Null content writes an empty file. All output paths must be within a permitted folder.

Parameters

ParameterDescription
cmddestination folder path (trailing backslash is optional)
Argument 0SQL statement whose first column is the filename and second column is the file content

Syntax


EmitSqlToFiles "destination folder path (trailing backslash is optional)", "SQL statement whose first column is the filename and second column is the file content"

Return to the AMSX Command Reference