Skip to Content
avatar image
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 08, 2015 at 06:41 AM

    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


    image 1.JPG (41.5 kB)
    image 2.JPG (14.5 kB)
    image 3.JPG (20.1 kB)
    Add comment
    10|10000 characters needed characters exceeded