EXEC master..xp_cmdshell 'bcp "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 VESTASLIFE..Tbl_FS_Mst f join VESTASLIFE..Tbl_User_Access ua on f.N_Type=ua.N_Type join VESTASLIFE..Tbl_User_Info ui on f.C_EmpNo=ui.C_Code left join (select c_fs_code,COUNT(distinct n_srno) as dcrcount from VESTASLIFE..tbl_dwr d where MONTH(d.D_Date_Report)=7 and YEAR(d.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 " queryout D:\VESTASLIFE\usercountdetails.txt -S GGSFADATA -T -t -c '
Error = [Microsoft][SQL Server Native Client 10.0]Function sequence error
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)