MODIFY_TSA_NEWCOL_EXPR

Modify a TSA column expression - a new column will be created in the PSA.

It may be any SQL expression with exact one (!) placeholder which is set in the array parameter The expression will be calculated during the load within the DV view. The thus calculated value will be stored in the new column in the PSA.

Parameter Name

Required

Parameter-Description

p_obj_schema

yes

TSA schema

p_obj_table

yes

TSA table

p_newcol_expr

no

column expression - use @# as placeholder (e.g. trim(@1)) (NULL value indicates no changes, ‘ ‘ to clear value)

p_newcol_datatype

no

datatype of new column

ARRAY p_newcols

no

array of columns used in column expression (empty ARRAY indicates no changes, format: array (‘position,column_name’, ‘position,column_name’, …)

Example

EXECUTE SCRIPT api_reppsa.modify_tsa_newcol_expr
           ( 'XXX'     -- p_obj_schema
           , 'XXX'     -- p_obj_table
           , 'XXX'     -- p_newcol_expr
           , 'XXX'     -- p_newcol_datatype
           , ARRAY ('position1,column_name1'
                   ,'position2,column_name2'
                   )   -- ARRAY p_newcols
           );