An additional column can be added in this expression columns using Hibernate Query Language (HQL). This is especially useful when you need to perform additional computation on multiple columns.
Example 1 - Cast column to data type "long".
Code Block |
---|
|
CAST(price AS long) |
Code Block |
---|
SUBSTRING(CAST(dateCreated as string),1,10) // To extract the date from the datetime database column |
Code Block |
---|
|
CAST(e.customProperties.sales_price AS long) - CAST(e.customProperties.price AS long) |
Example 2 - Concatenate multiple columns into one.
Code Block |
---|
|
CONCAT(first_name, ' ', last_name) |
Code Block |
---|
|
first_name ||' '|| last_name |