SQL Script Calculation View: in CE_PROJECTION use CE_CALC function to concatenate an input column and a text string
I have the following code in a SQL script calculation view:
p_r1_errors = CE_PROJECTION (:j_r1_errors,
CE_CALC ((''' is blank.'''),NVARCHAR(255)) AS "CC_ERROR_TEXT"]);
What I would like to do is to concatinate "FIELD_DESCRIPTION" and ' is blank.' and output it as the "CC_ERROR_TEXT".
"FIELD_DESCRIPTION" is currently defined as VARCHAR(255) (not NVARCHAR).
What is the correct syntax to achieve the desired result?
Sreehari V Pillai replied
Let the below screenshots speak how to do it.
The expression is dynamically evaluated when we use CE_CALC, and the evaluation expression should be a string(hence inside ' ' ). All columns should be inside double quotes. + symbol is used for concatenation. Which ever column is projected using the CE_PROJECTION, only that column can be used inside CE_CALC for evaluation.
Message was edited by: Sreehari V Pillai