Senin, 03 Juni 2013

[belajar-access] query bertingkat saya lama [1 Attachment]

 
[Attachment(s) from yufman included below]

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.



__._,_.___

Attachment(s) from yufman

1 of 1 File(s)

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

__,_._,___

Tidak ada komentar:

Posting Komentar