kalo maksudnya buat tabel spt ini:
cth:
Mat_Id             Tot_Rec                 tot_Issue
   001                    10                          5
   002                    20                         15
 
mungkin cara ini bukan yg terbaik tp bisa membantu:
1. buat query crosstab dari tabel RECEIVING (qRec) yang memuat total Qty per 
Mat_Id.
    cth crosstab per tahun:
    TRANSFORM Sum(RECEIVING.Qty_Rec) 
    SELECT RECEIVING.Mat_Id, Sum(RECEIVING.Qty_Rec) AS Tot_Qty_Rec
    FROM RECEIVING
    GROUP BY RECEIVING.Mat_Id
    PIVOT Format(Rec_Date,"yyyy");
 
    hasilnya spt:
    Mat_Id         Tot_Qty_Rec         2005     
      001                   10                  10
      002                   20                  20
 
2. buat query crosstab dari tabel ISSUE (qIssue) yang memuat total Qty per 
Mat_Id.
    cth crosstab per tahun:
    TRANSFORM Sum(ISSUE.Qty_Issue) 
    SELECT ISSUE.Mat_Id, Sum(ISSUE.Qty_Issue) AS Tot_Qty_Issue
    FROM ISSUE
    GROUP BY ISSUE.Mat_Id
    PIVOT Format(Issue_Date,"yyyy");


    hasilnya spt:
    Mat_Id         Tot_Qty_Issue         2005     
      001                     5                      5
      002                    15                    15
 
3. terakhir buat query gabungan (qIN_OUT) dari query qRec dan qIssue yang 
memuat total Qty_Rec dan  
    Qty_Issue per Mat_Id.
    cth crosstab per tahun:
    SELECT MASTER.Mat_Id, qRec.Tot_Qty_Rec, qIssue.Tot_Qty_Issue
    FROM MASTER LEFT JOIN qRec ON MASTER.Mat_Id =  qRec.Mat_Id 
    LEFT JOIN qIssue ON MASTER.Mat_Id = qIssue.Mat_Id;
 
    hasilnya spt:        Mat_Id             Tot_Rec                 tot_Issue
       001                    10                          5
       002                    20                         15
 
dengan cara ini maka setiap tabel RECEIVING dan ISSUE terupdate, maka query 
qIN_OUT akan terupdate secara otomatis.
 
smoga m'bantu
    




dingin00hs <[EMAIL PROTECTED]> wrote:
blm pnah praktis seh, make logika + dikit teori normalisasi.
mending di tabel MasterMaterial di tambah lagi 3 field, 
- tot_issue
- tot_receive
- tot_onhand

terus mat_name di dua tabel itu apa gak sebaiknya refer ke tabel 
master aja? kecuali kalo pengen ngindari issue ttg performance 
(cepetan ngambil dari 1 tabel dibanding 2 tabel).

salam,
huda

--- In [email protected], "dadargulungs" 
<[EMAIL PROTECTED]> wrote:
> Dear VB Master,
> Mohon dibantu lagi.
> Saat ini saya sdg membuat aplikasi In Out material dengan mengunakan
> VB6.0 dan MS Access, dgn tabel sbb:
> 
> RECEIVING
> Mat_Id, Mat_Name,Qty_Rec, Rec_Date
> 
> ISSUE
> Mat_Id, Mat_Name,Qty_Issue,Issue_date
> 
> Saya ingin membuat tabel satu lagi yg memuat total / sum Qty dari
> RECEIVING dan ISSUE untuk masing2 Mat_Id, kalau memungkinkan update 
ke
> tabel ini bisa dilakukan sekaligus pada saat kita input di RECEIVING
> ataupun ISSUE, apakah ini bisa dilakukan atau bagaimana sebaiknya.
> Terimakasih sebelumnya.
> 
> Regards,
> NEWBIE




Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED]

Ikuti juga forum diskusi VB.net dengan 
mengirim email kosong ke [EMAIL PROTECTED]




SPONSORED LINKS 
Computer education Computer education online Computer programming education 
Computer technology education Computer science distance education 

---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "indoprog-vb" on the web.
  
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


---------------------------------



                
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Find what you need with new enhanced search. Learn more.

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hvfeu6k/M=362329.6886308.7839368.1510227/D=groups/S=1705689267:TM/Y=YAHOO/EXP=1123152776/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED]

Ikuti juga forum diskusi VB.net dengan 
mengirim email kosong ke [EMAIL PROTECTED]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indoprog-vb/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke