cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Script Calculation View: in CE_PROJECTION use CE_CALC function to concatenate an input column and a text string

Former Member
0 Kudos

Hello,

I have the following code in a SQL script calculation view:

p_r1_errors = CE_PROJECTION (:j_r1_errors,

["MATNR","ERSDA","MTART",

"SPRAS","MAKTX",

"RULE_ID","TABLE_NAME","FIELD_TECH_NAME","FIELD_DESCRIPTION",

"RULE_LONG_TEXT","RULE_DIMENSION",

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?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

sreehari_vpillai
Active Contributor
0 Kudos

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.

Sreehari

Message was edited by: Sreehari V Pillai

Former Member
0 Kudos

That was it!  Thank you very much!

Victoria

Answers (0)