Click on this push button to display samples of valid SQL expressions.
You can use the following operators in an SQL expression for a computed column or a WHERE clause. All normal restrictions apply to the operators. See your database's SQL reference guide for information about additional operators and restrictions for your database.
Operators:
Column functions:
Scalar functions:
Predicate comparison operators:
Predicate quantifiers:
Special registers:
Sample SQL expressions:
MAX_BILLED = MAX(QUANTITY_BILLED)
CURRENT_BALANCE = AMOUNT_OWED - PAYMENT_AMOUNT
PERCENT_CHANGE = ((COLUMN1 - COLUMN2) * 100)/COLUMN2
LAST_UPDATE = DATE(CURRENT TIMESTAMP)
Scenario: You selected the following columns and added them to the target columns list: AVG_PRICE, SALESID, and UNIT_PRICE. You now want to add a column that contains a summary of the AVG_PRICE column. The new column is named SUMMARY_AVGPRICE and the expression is derived from the SQL expression:
SUM(AVG_PRICE)
SUMMARY_AVGPRICE
Because you selected more than one target table column name and used an SQL column function with a column name, you must enter a GROUP BY clause on the Rows page.
GROUP BY AVG_PRICE, SALESID, UNIT_PRICE