Add expressions

Use the Expression Builder window to add expressions to an SQL statement. You can type an expression directly into the Expression field, or you can use the fields and controls in the Expression Builder window to build an expression.

An expression specifies a value. It can be a simple value that consists of only a constant or a column name, or it can be more complex. Several expression types are supported in SQL Assist.

To add expressions to an SQL statement:

  1. Use the Columns, Operators, and Case lists to select the components of the expression. Double-click a column, operator, or case keyword to add it to the Expression field. Each item that you double-click is appended to the expression in the Expression field, so be sure to select items in the order that you want them displayed.
  2. Optional: Add specific values to the expression. Type a value in the Value field, then click the checkmark to add the value to the Expression field.
  3. Optional: Add a function to the expression:
    1. Select a category from the Functions list. The list below the Functions field changes to display functions in the specified category.
    2. Double-click a function in the list below the Functions field. The Function parameters window opens.
    3. In the Function parameters window, select the format of the function and specify the parameter values.
    4. Click OK. The Function parameters window closes. The function and its parameters are displayed in the Expression field.
  4. Optional: Add a constant to the expression:
    1. Select a category from the Constants list. The list below the Constants field changes to display constants in the specified category.
    2. Double-click a constant in the list below the Constants field. The constant is added to the expression in the Expression field.
  5. Optional: Use the following push buttons to work with the expression:
  6. Click OK. If the expression syntax is valid, the Expression Builder window closes and the expression is added to the field where you launched the Expression Builder window. If the expression syntax is invalid, an error message window opens.

See also: