When creating a table column that has a calculation type, it is necessary to write some code. Based on the type, the structure of the code will be different from one and other. Such like Expression columns, you can make use of the “T1.” alias, which is the table itself, whilst Calculated columns cannot use this.
Just like the code example in Control procedure for SQL-typed CP's, I would like a short example that shows me as a developer what I can (and cannot) use as code.
Example:
- Expression:
concat_ws(' ', t1.first_name, t1.last_name) --Thanks @Robbert :)
- Calculated:
(100.0 + tax_percentage) / 100.0
- Calculated (function):
select sum(order_total) from sales_order where sales_order_id = @sales_order_id