Yes. You can do this by two ways.
1. If your database allows such formulas in SQL, use this way. For example:
SELECT
column1,
column2,
column3,
column1 + column2 as MyFormula1,
column2 || column3 as MyFormula2
FROM MyTable
2. Another way is to specify your formulas at Field Mappings step of Export dialog. In formulas here, you can use columns of your source table, special functions, and even local files.
So, click Add button. A new row will appear for a new field mapping. Click ... button in the first column and specify your expression (formula). Examples:
a. Get sum of two columns
vle_expr(dataset_field_val(1, 'column1') + dataset_field_val(1, 'column2'))
b. Replace specific characters in the column's data
vle_expr(string_replace(dataset_field_val(1, 'column3'), char(0), ' '))
c. Get the size of a file, referred in the column's data
vle_expr(file_size(dataset_field_val(1, 'column3')))
In the column to the right, specify the target field name as you usually do for exporting physical fields.
|