select s.sku, s.skuDesc, convert( int, tpf.forecast_year ) forecast_year, convert( int, tpf.forecast_month ) forecast_month, sum( forecast_qty ) cases, sum( forecast_amt ) dollars from tbl_MFR_TPF_Detail tpf inner join tbl_PRD_Skus s on s.skuId = tpf.skuId where tpf.forecast_status = 'C' and tpf.mfr_id = 4441 group by s.sku, s.skuDesc, tpf.forecast_year, tpf.forecast_month order by sku, convert( int, tpf.forecast_year ), convert( int, tpf.forecast_month ) select distinct forecast_year, forecast_month from qmd_claimTotals order by forecast_year, forecast_month select * from qmd_pivot order by skuTotal desc
SKU Description #listGetAt( _c, 3, "_" )#/#listGetAt( _c, 2, "_" )# Total
#htmleditformat( sku )# #htmleditformat( skuDesc )# #qmd_pivot[_c][currentRow]# #skuTotal#
Calendar Year #forecast_year#
#forecast_year# #forecast_month#
#sku# #skuDesc# #cases# #dollars#
#forecast_year#/#forecast_month# Monthly Totals #_monthlyTotalCases# #_monthlyTotalDollars#
#forecast_year# Annual Totals #_annualTotalCases# #_annualTotalDollars#
select s.sku, s.skuDesc, tpf.forecast_year, tpf.forecast_month, sum( forecast_qty ) cases, sum( forecast_amt ) dollars from tbl_MFR_TPF_Detail tpf inner join tbl_PRD_Skus s on s.skuId = tpf.skuId where tpf.forecast_status = 'C' and tpf.mfr_id = 4441 group by s.sku, s.skuDesc, tpf.forecast_year, tpf.forecast_month order by convert( int, tpf.forecast_year ) desc, convert( int, tpf.forecast_month ) desc, sku
Calendar Year #forecast_year#
#forecast_year# #forecast_month#
#sku# #skuDesc# #cases# #dollars#
#forecast_year#/#forecast_month# Monthly Totals #_monthlyTotalCases# #_monthlyTotalDollars#
#forecast_year# Annual Totals #_annualTotalCases# #_annualTotalDollars#