select f.C_EmpNo as EmpCode,f.C_Name as FSName,ua.N_Type as NType, ua.c_sh_name as Desg, ui.C_UserID as UserID,dwr.dcrcount as DCR_Count from Tbl_FS_Mst f join Tbl_User_Access ua on f.N_Type=ua.N_Type join Tbl_User_Info ui on f.C_EmpNo=ui.C_Code left join ( select c_fs_code,COUNT(distinct n_srno) as dcrcount from tbl_dwr d where MONTH(d_date_report)=3 and year(d_date_report)=2015 group by c_fs_code )dwr on dwr.C_FS_Code=f.C_Code where f.C_EmpNo<>'000000' or dwr.dcrcount is not null --and dwr.dcrcount=null order by f.C_EmpNo,f.N_Type,f.C_Name
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)