CE_CALC evaluates an expression and then bound to a new column

Example:
 with_tax = CE_PROJECTION(:product, [“CID”, “CNAME”, “OID”, “SALES”, CE_CALC('”SALES” * :vat_rate', decimal(10,2)) AS “SALES_VAT”], ''”CNAME” = ':cname''');
Is equivalent to
with_tax2 = SELECT cid, cname, oid, sales, sales * :vat_rate AS sales_vat FROM :productmWHERE cname = ':cname'; 

All columns used in CE_CALC have to be included in the projection list. Another frequent use of CE_CALC is computing row numbers.

 CE_CALC('rownum()', integer) AS "RANK" 

Related questions