tuik_beta.rpr.deg 425 B

12345678
  1. set @merkez='28';
  2. set @stkod1='b0614';
  3. set @stkod2='b0604';
  4. set @kgdeger=2;
  5. set @ay="07";
  6. set @yon='g';
  7. select b.stok_kodu,a.stok_adi,sum(round(b.miktar,2)) as miktar,sum(round(b.miktar*a.birim_agirlik)) as agirlik,b.hedef from sthar as b inner join tblstsabit as a on a.stok_kodu=b.stok_kodu where ftip=@yon and kaynak=@merkez and b.stok_kodu in (@stkod1,@stkod2) and hedef in ('10') and month(tarih)=@ay group by stok_kodu