SQL Text literal parameter values consist of any valid SQL text and are placed in the SQL “as-is” without formatting. When dragging a literal Text parameter value into a variable, the following tree element is created.
No default text is provided - use the Properties panel to change it. Double-click on Text or highlight and click Properties.
- Parameter — Either ‘<NewParameter>’ may be selected, or an existing parameter may be selected via the pull-down list.
- Name — When ‘<NewParameter>’ is selected, the Name of the new parameter may be entered here. The name must be unique among all parameters defined in the analysis.
- Description — A description of the parameter may be entered here. It should be limited to 512 characters if the analysis is ever to be published to the Model Manager application.
SQL Text — Type in any valid Teradata SQL text. It should be limited to 8192 characters if the analysis is ever to be published to the Model Manager application.An example of a SQL Text literal might be a table name, hexadecimal literal such as '00'XC, or a literal string with more than one quote, such as ‘If it isn’t broken, don’t fix it’.Since the Text literal is used “as-is” the user must enter any necessary quote marks. Also, in the second example, embedded quote marks must be “escaped” by the user by adding an extra quote mark for each one. The second example requires a Text literal due to the fact that embedded quote marks in String literals are ignored when there is more than one.Standard right-click menu options are available within the text box, namely Undo, Cut, Copy, Paste, Delete and Select All. Note, however, that the Paste option will convert a columnar list of values separated by carriage returns into a comma separated list, making it easier to copy values from other tools such as Microsoft Excel. Conversion of the values into valid Teradata literals is attempted for each of the incoming values, first into various numeric types, then if these fail, into date values, and finally if these conversions fail, the values are converted into a list of String literals.When pasting a list of values into this field, care should be taken that the items comprising the list do not themselves contain the current locale's list separator character, leading to undesired results.
Add single quotes — When this box is checked, the Text parameter behaves just like a String parameter would. That is, single quote marks are added to the beginning and ending of the text, and if the text contains a single quote mark already, it is “escaped” by replacing it with two quote marks. If however the text already contains two or more quote marks, the text is used in SQL “as-is”.If this box is not checked, the String literal will be placed in the SQL “as-is”, which is the normal behavior of a Text parameter.The Text parameter option “Add quotes” must not be used when outputting to a stored procedure.