Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sytntax Error

Hello,

LOAD application_no,

     paycode as %PAYCODE,

     request_id,

//     request_date,

     date(leave_from,'DD-MMM-YYYY') as leave_from,

     year(leave_from) as LeaveYear,

     month(leave_from) as LeaveMonth,

     day(leave_from) as LeaveDay,

     leave_to,

     //leave_to,

     leavecode as LEAVECODE,

//     halfday,

     leavedays,

     //if(leavecode='CL', sum(leavedays),'0') as CLAccrued,

     Sum(if(leavecode='CL', leavedays)),

     userremarks

FROM

$(Vrawqvdspath)\LeaveRequest.qvd

(qvd) Group by paycode, month(leave_from);

Can somebody tell me what is the error in this code?

It is giving me error.

Regards,

Balraj

10 Replies
its_anandrjs
Champion III
Champion III

It should be or not necessary but depends on the requirement or the data also because when you use leavecode and leavedays in group by the data is aggregated according to the leavecode and leavedays also use some naming convention for the SUM statement like


Sum(if(leavecode='CL', leavedays)) as SumLeavdays,