@
The preferred, concise way to run a Script, a text file of SQL statements and BroadSQL commands. @foo.bsql runs a Script from the Scripts Library, @./foo.bsql runs a file relative to the working directory (or to the running Script's own directory when written inside a Script), and @C:\temp\foo.bsql runs a file anywhere. No extension is ever added.
Arguments
<script> (mandatory) a Scripts Library path, ./relative path, or absolute path, then optional parameters
Examples
@maintenance/cleanup.bsql
@./helper.bsql
@"C:\My Scripts\foo.bsql" value1 "value 2"
Notes
Runs a Script: @<reference> [parameter ...]. The preferred, concise way to execute a Script.
A Script is a text file of SQL statements, BroadSQL commands, or both, separated by ;. The file extension means nothing to BroadSQL. The reference is resolved by ScriptResolver, the same way for every command and the editor.
@foo.bsql and @maintenance/foo.bsql are relative to the Scripts Library root, never to the working directory, and no extension is ever guessed: @foo is the file named foo.
@./foo.bsql is relative to the working directory when typed at the prompt, and to the directory of the running Script when written inside a Script, so a folder of Scripts can be moved as a bundle.
@C:\temp\foo.bsql or @/tmp/foo.bsql is an explicit path to a Script outside the library.
Quote a reference or parameter that contains spaces. Parameters %1 to %9 in the Script are replaced by the values given after the reference. Execution is shared with LIB RUN and the BroadSQL Editor.
Last modified in release 5.2.10.
BroadSQL