Dear community,
I am struck up with this error, "invalid column name(alias column- PEXP)" which is not recognised by hana interpreter, when used in below sql statement of hana modelling.
Select PROD,CATEGORY,DOE,LAG(DOE,1,DOE) OVER (PARTITION BY CATEGORY ORDER BY DOE)
AS "PEXP" ,DAYS_BETWEEN(DOE,PEXP) FROM "TARAK"."EXP";
error message "invalid column name"
SAP DBTech JDBC: [260]: invalid column name: PEXP: line 2 col 29 (at pos 111)
DOE is the date column,which i used in function LAG() to generate PEXP alias column.
I need the no of days between the two date columns DOE and PEXP, so i used the DAYS_BETWEEN() function.