gsqlcmd Template Options

gsqlcmd Template Options

/noTemplate

Use this option to disable the use of a template for HTML and XML output.

/placeholder=<placeholder>

This option allows you to define a template placeholder for inserting output data.

For example, if your template sales_report.htm includes the {sales} placeholder, you would use the following command:

gsqlcmd exec db export-sales.sql /asHtml /template=sales_report.htm /placeholder={sales}

By default, the HTML and XML templates contain a single {table} placeholder.

For instance, using the default template, the command would look like this:

gsqlcmd exec db export-sales.sql sales_report.htm

/template=<file name>

Use this option to specify an output template.

Combine it with the /placeholder option.

For example, if your template sales_report.htm includes the {sales} placeholder, you would use:

/template=sales_report.htm /placeholder={sales}

You can also edit the default XML and HTML templates located in the Resources folder. These templates include the {table} placeholder by default.

Additionally, the HTML template can contain the {title} placeholder to incorporate a value from the /title option.

/title=<title>

This option sets a value for the {title} placeholder in HTML templates.

For example:

gsqlcmd exec db export-sales.sql sales_report.htm "/title=Sales Report"

In this command, gsqlcmd generates sales_report.htm using the default template, inserting data into the {table} placeholder and the specified title into the {title} placeholder.

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.