Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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.

Tags:
Former Member
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.

Sreehari

Message was edited by: Sreehari V Pillai

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question