Hi Stefan,
Here is the approach i followed (HANA revision 46).
I created a table with column YEAR with data type NVARCHAR which has numeric value.
In CE_PROJECTION I included this YEAR field and using CE_CALC function I converted NVARCHAR YEAR column to INTEGER YEAR1 attribute.
In the output, I not included the YEAR but included YEAR1. In the script always code the column in CE_PROJECTION which you use in CE_CALC.
This is the script:
/********* Begin Procedure Script ************/
BEGIN
T_CE_FUN = CE_COLUMN_TABLE(CE_FUN);
var_out = CE_PROJECTION(:T_CE_FUN, [PRODUCT_ID
, PRODUCT_NAME
, SALES
, "YEAR"
, CE_CALC( '("YEAR")', integer) AS "YEAR1"
]);
END /********* End Procedure Script ************/
The below screenshot shows the table definition, data, sqlscript, and output of Calculation view.
Regards
Raj