Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
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

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,