| Home | Previous Lesson: Having Clause Next Lesson: Syntax |
This allows defining of computed columns based upon one or more existing columns. For example, to show the balances that are above the reorder level you can say "excess_balance = product_balance - product_reorder_level".
SELECT "product_master"."product_no",
"product_master"."product_description",
"product_master"."product_balance",
"product_master"."product_reorder_level",
"product_master"."product_measuring_unit",
excess_balance = "product_master"."product_balance" - "product_master"."product_reorder_level"
FROM "product_master"
Don't get confused between Sybase's transact-SQL computed columns with COMPUTE clause in the SELECT statement. Right-clicking on the Computed Column, PowerBuilder brings up a menu. It allows you to select columns from your tables as well as predefined PowerBuilder functions.
| Home | Previous Lesson: Having Clause Next Lesson: Syntax |