Zoomed Image

AMSX Scripting Language - Command : executesqltemplate

Summary

Execute a named SQL template with positional argument substitution

Description

Looks up a SQL template by name (first in locally defined templates, then in SpecialOptions), replaces %arg1% through %arg41% placeholders with the supplied arguments, and executes the resulting SQL. Use to reuse parameterised SQL fragments across scripts.

Parameters

ParameterDescription
cmdTemplate name to look up
Argument 0Value substituted for %arg1% in the template
Argument 1Value substituted for %arg2% in the template

Syntax


ExecuteSqlTemplate "Template name to look up", "Value substituted for %arg1% in the template", "Value substituted for %arg2% in the template"

Return to the AMSX Command Reference