sql server 2008 - Limited result is coming when I run Join query? -
i getting only 5001 rows of result when run query:
select case v_all.job_qty_blankpages when 0 v_all.job_qty_bwpages + v_all.job_qty_colorpages + (v_all.job_qty_blankpages + ((v_all.job_qty_simplexpages + v_all.job_qty_duplexpages * 2) - (v_all.job_qty_bwpages + v_all.job_qty_colorpages))) else v_all.job_qty_bwpages + v_all.job_qty_colorpages + v_all.job_qty_blankpages end printedpages, v_all.job_qty_bwpages bwpages, v_all.job_qty_colorpages colorpages, case v_all.job_qty_blankpages when 0 v_all.job_qty_blankpages + ((v_all.job_qty_simplexpages + v_all.job_qty_duplexpages * 2) - (v_all.job_qty_bwpages + v_all.job_qty_colorpages)) else v_all.job_qty_blankpages end blankpages, v_all.job_qty_simplexpages simplexpages, v_all.job_qty_duplexpages * 2 duplexpages, v_all.job_qty_simplexpages + v_all.job_qty_duplexpages totalsheets, v_all.job_lab_ntdomainname, v_all.lab_groupname, v_all.job_lab_ntusername ,v_all.lab_ntfullusername ,v_all.printer_lab_location ,v_all.job_lab_documentname ,v_all.job_qty_size ,v_all.job_qty_copies ,v_all.job_date_submitted ,t_ad_data.lab_samaccountname ,t_ad_data.lab_department ,t_ad_data.lab_physicaldeliveryofficename v_all left join t_ad_data on v_all.lab_ntfullusername = t_ad_data.lab_samaccountname job_date_submitted between '2015-01-01 12:59:59.000' , '2015-01-31 12:59:59.000';
first check how many rows there in each table , when u use left join return rows left table (v_all), matching rows in right table (t_ad_data).
so check whether have non matching rows between these tables. if there need change join condition.
Comments
Post a Comment