run

Treats the value of the string as a valid file name, and redirects sqlf processing to read from that file until it ends or an exit command is executed.

Syntax

RUN String

Description

Treats the value of the string as a valid file name, and redirects sqlf processing to read from that file until it ends or an Exit command is executed. If the end of the file is reached without sqlf exiting, reading continues from the previous input source once the end of the file is reached. Files can contain Run commands.

sqlf prints out the statements in the file as it executes them.

Any changes made to the sqlf environment by the file are visible in the environment when processing resumes.

Example

sqlf(PEERCLIENT)> run 'ToursDB_schema.sql';