Query Development | Parameterized Queries | Teradata Studio/Studio Express - Parameterized Queries - Teradata Studio

Teradata® Studio™ Express User Guide

Product
Teradata Studio
Release Number
20.00
Publication Date
October 2023
Content Type
User Guide
Publication ID
B035-2042-103K
ft:locale
en-US
ft:lastEdition
2026-10-23
dita:mapPath
zpv1696897581767.ditamap
dita:ditavalPath
ft:empty
ft:sourceId
dita
dita:id
wsb1469630620005

SQL statements can contain parameter placeholders (question marks) in most cases where you can specify constants. When you run SQL that contains one or more parameter placeholders from the SQL Editor, you are prompted to specify the values for each of the parameters. The values you specify are substituted for the parameter placeholders when the SQL executes.

Named Parameters

A special SQL element in the SQL Editor enables you to assign names to parameter placeholders. The form of the new element is: ?\name

This form follows the rules of forming unquoted names which is a question mark followed by a back slash followed by a name with no space between the parts.

Parameters that are specified without a name, that is, by using just the question mark alone, display with the name "Parameter n" where the n indicates the index of the parameter for the SQL value.

For character string or binary columns, the Configure Parameters dialog box provides a From File option which reads the input value from a file. To specify the input file, select the cell ellipsis (...) and display a dialog in which you can specify the input file.
The Specify File option is not available for parameterized queries when using the Execute All command.

Re-executing Parameterized Queries

When you select an entry in the list of operations in the SQL Results view that is produced by running parameterized SQL and select Reexecute from the context menu, you are presented with a dialog for specifying the parameter values. The dialog initially contains the values that were used to produce the results.