Selasa, 04 Juni 2013

Re: [belajar-access] query bertingkat saya lama

 

selama apa ya mas yufman ?
saya test biasa aja,
mungkin kalau datanya lebih banyak ?

aksan kurdin

On 6/4/2013 1:46 AM, yufman wrote:
 
salam

para master acces, keluarga besar abelajar access, mudahan semua dalam keadaan sehat.

saya mohon pencerahanya, saya membuat query bertingkat untuk perhitungan stok barang, namun prosesnya lama ,bagaimana cara efektifnya biar data bisa di akses lebih cepat.

query saya sbb:

SELECT tb_material.code, tb_material.JenisMaterial, tb_material.Description, tb_material.colour, tb_material.Detail AS MaterialDetail, tb_material.uom, (select sum(B.MKQTY) from tb_qsInOutFG as B
where B.Materialcode=tb_material.code and b.MK="M" and
b.tglMK < Forms![frm_LaporanGudang]![txttglawal] ) AS SaldoAwal, (select Sum(B.MKQTY) FROM tb_qsInOutFG AS B
WHERE (((B.materialcode)=[tb_material].[code]) AND ((B.MK)="M") AND ((B.TGLMK) Between [Forms]![frm_LaporanGudang]![txttglawal] And [Forms]![frm_LaporanGudang]![txttglakhir]))) AS QtyMasuk, (select abs( Sum(B.MKQTY)) FROM tb_qsInOutFG AS B
WHERE (((B.materialcode)=[tb_material].[code]) AND ((B.MK)="K") AND ((B.TGLMK) Between [Forms]![frm_LaporanGudang]![txttglawal] And [Forms]![frm_LaporanGudang]![txttglakhir]))) AS Qtykeluar, 0 AS Penyesuaian, (nz([SaldoAwal])+nz([QtyMasuk]))-nz([Qtykeluar])+nz([Penyesuaian]) AS SaldoAkhir, 0 AS StokOpname, 0 AS Selisih
FROM tb_material
WHERE (((tb_material.JenisMaterial)="Finish good"))
ORDER BY tb_material.code;

terimakasih sebelumnya.




__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
SPAM IS PROHIBITED
.

__,_._,___

Tidak ada komentar:

Posting Komentar