Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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,