MODIFY_PSA_COLUMN_EXPR¶
Modify a PSA column expression (only the change of datatype or expression is possible).
It may be any SQL expression with placeholders for each PSA column used. The placeholder contains a “@” and the name of the PSA column. The expression will be calculated during the load within DV view. There is no seperate historization for this column, because the historization is already done for the original values used in the expression.
Parameter Name |
Required |
Parameter-Description |
---|---|---|
p_obj_schema |
yes |
PSA schema |
p_obj_table |
yes |
PSA table |
p_col_name |
yes |
PSA column name |
p_col_type |
no |
PSA column data type |
p_col_expr |
no |
PSA column expression (as column placeholder please use mandatory “@” + PSA column name, e.g. (CASE WHEN @CUSTOMER_TYPE = ‘’S’’ THEN ‘’X’’ ELSE ‘’Y’’ END) |
Example
EXECUTE SCRIPT api_reppsa.modify_psa_column_expr
( 'XXX' -- p_obj_schema
, 'XXX' -- p_obj_table
, 'XXX' -- p_col_name
, 'XXX' -- p_col_type
, 'XXX' -- p_col_expr
);