You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following case statement on a table for the ON READ. For some reason the query gets converted to current_date() which does not exist in HANA. I am unsure if it is the changelog doing it or the CAP cds-dbs module, but this only happens on change logs getting saved.
case
when (ReportHeaders.status_code= ? andReportHeaders.dueDate<ReportHeaders.modifiedAt) then true
when (ReportHeaders.status_code<> ? andReportHeaders.dueDate<current_date)
Query generated by cap-js/changelog
WITH ReportHeaders as (SELECT *,('$[' || lpad("$$RN$$",6,'0')) as _path_ FROM (SELECT *,ROW_NUMBER() OVER () as "$$RN$$" FROM (SELECT ReportHeaders.ID,ReportHeaders.createdAt,ReportHeaders.createdBy,ReportHeaders.modifiedAt,ReportHeaders.modifiedBy,ReportHeaders.createdByName,ReportHeaders.modifiedByName,ReportHeaders.report_ID,ReportHeaders.payrollYear,ReportHeaders.payrollPeriod,ReportHeaders.payrollArea,ReportHeaders.position_ID,ReportHeaders.organisation_ID,ReportHeaders.payPeriodStartDate,ReportHeaders.payPeriodEndDate,ReportHeaders.previousPayrollYear,ReportHeaders.previousPayrollPeriod,ReportHeaders.status_code,ReportHeaders.assigned_ID,ReportHeaders.processId,ReportHeaders.escalationId,ReportHeaders.dueDate,case when (ReportHeaders.status_code = ? and ReportHeaders.dueDate < ReportHeaders.modifiedAt) then true when (ReportHeaders.status_code <> ? and ReportHeaders.dueDate < current_date()) then true else false end as isLate,case when (ReportHeaders.status_code = ? and ReportHeaders.dueDate < ReportHeaders.modifiedAt) then days_between(ReportHeaders.dueDate,ReportHeaders.modifiedAt) when (ReportHeaders.status_code <> ? and ReportHeaders.dueDate < current_date()) then days_between(ReportHeaders.dueDate,current_date()) else ? end as daysLate FROM tmr_csr_db_ReportHeaders as ReportHeaders WHERE ReportHeaders.ID = ?) as ReportHeaders) as ReportHeaders) SELECT "_path_","_blobs_","_expands_","_json_" FROM (SELECT _path_ as "_path_",'{}' as "_blobs_",'{}' as "_expands_",(SELECT ID as "ID",to_char(createdAt, 'YYYY-MM-DD"T"HH24:MI:SS.FF3"Z"') as "createdAt",createdBy as "createdBy",to_char(modifiedAt, 'YYYY-MM-DD"T"HH24:MI:SS.FF3"Z"') as "modifiedAt",modifiedBy as "modifiedBy",createdByName as "createdByName",modifiedByName as "modifiedByName",report_ID as "report_ID",payrollYear as "payrollYear",payrollPeriod as "payrollPeriod",payrollArea as "payrollArea",position_ID as "position_ID",organisation_ID as "organisation_ID",to_char(payPeriodStartDate, 'YYYY-MM-DD') as "payPeriodStartDate",to_char(payPeriodEndDate, 'YYYY-MM-DD') as "payPeriodEndDate",previousPayrollYear as "previousPayrollYear",previousPayrollPeriod as "previousPayrollPeriod",status_code as "status_code",assigned_ID as "assigned_ID",processId as "processId",escalationId as "escalationId",to_char(dueDate, 'YYYY-MM-DD') as "dueDate",isLate as "isLate",daysLate as "daysLate" FROM JSON_TABLE('[{}]', '$' COLUMNS("'$$FaKeDuMmYCoLuMn$$'" FOR ORDINALITY)) FOR JSON ('format'='no', 'omitnull'='no', 'arraywrap'='no') RETURNS NVARCHAR(2147483647)) as "_json_" FROM ReportHeaders) ORDER BY "_path_" ASC
The text was updated successfully, but these errors were encountered:
I have the following case statement on a table for the ON READ. For some reason the query gets converted to
current_date()
which does not exist in HANA. I am unsure if it is the changelog doing it or the CAP cds-dbs module, but this only happens on change logs getting saved.Query generated by cap-js/changelog
The text was updated successfully, but these errors were encountered: