Skip to Content
0
Former Member
Jun 13, 2014 at 10:10 AM

Not able to create view in HANA.

12 Views

i want to create view by using HANA stored procedure,but unable to do.

It's giving error that incorrect syntax near ".".

Here is my code :

CREATE VIEW "@HourTransactionView" AS SELECT "@TRANSACTION_HOURS"."DocEntry", "@TRANSACTION_HOURS"."DocNum",

"@TRANSACTION_HOURS"."U_EmpCode" AS "EmpID",

call "PAYROLLDBTEST".GetEmpCodeFromEmployeeID(EmpID,EmpCode) AS "EmpCode" ,

GetEmployeeFullName("@TRANSACTION_HOURS"."U_EmpCode") AS "FullName", "U_TransactionType" AS "TranCode",

GetHourTableName("U_TransactionType") AS "TableName", GetHourTransactionName("U_TransactionType") AS "TranName",

"U_FromDate", "U_ToDate", DAYS_BETWEEN("U_FromDate", "U_ToDate") + 1 AS "NoOfDays", "U_FromTime", "U_ToTime",

IFNULL("U_WorkHours", 0) AS "NoOfHours", IFNULL("U_OvertimeHours", 0) AS "OvertimeHours",

IFNULL("U_PaidDays", 0) AS "PaidDays", IFNULL("U_UnpaidDays", 0) AS "UnpaidDays",

IFNULL("U_WeekendsCount", 0) AS "Weekends", IFNULL("U_HolidaysCount", 0) AS "Holidays", "U_Remarks", "U_BatchNo",

"U_ProjectCode" AS "ProjectCode"

FROM "@TRANSACTION_HOURS"

INNER JOIN OHEM ON OHEM."empID" = "@TRANSACTION_HOURS"."U_EmpCode";

Please help me to find solution.

Thank You.