A SQL Function may be created using this function, either supplying the function name as free-form text or as a selection from a pull-down list in the Properties dialog. Arguments to the function may be supplied by dragging columns or expressions into the Arguments folder underneath the function in the tree. These are passed to the function in a comma-separated list.
Besides providing a convenient alternative to the SQL Text function when the free-form text represents an SQL function, this function (when used with the Teradata database) also provides a convenient means of selecting from more than 25 functions not otherwise listed as available SQL elements. Once a function is selected, a description of the function and its arguments is automatically displayed, along with an indication of whether or not the function is an aggregation function. If the desired function is not included in the pull-down list it may be typed into the Function Name
If a function can optionally be called without parameters, enter it with parentheses attached, such as HASHAMP(). Functions that do not have any parameters should be entered without parentheses, as with ACCOUNT.
When dragging a SQL Text Function operator into a variable, the following tree element is created.
Variable Creation > Input > Variables > SQL Elements Pane > Other > Function
Double-click on SQL Text Function, or highlight it and click Properties.
Variable Creation > Input > Variables > SQL Elements Pane > Other > Function Properties
The following is an example that generates the Teradata SQL Function CHAR2HEXINT, passing it the column account_active as an argument.
Variable Creation > Input > Variables > SQL Elements Pane > Other > Function (example)
By selecting the Properties button and by then selecting CHAR2HEXINT from the Function Name pull-down list, the following can be seen.
Variable Creation > Input > Variables > SQL Elements Pane > Other > Function Properties (example)
The Aggregation function check box is not checked since CHAR2HEXINT is not an aggregation function. If a function that is an aggregation function is typed in, be sure to check this box to ensure more complete processing and error checking.