Ini yang dimaksud :
1. saya mo ambil jumlah seluruh nilai trans yg no urut trans nya di bawah
max(nilai_trans) tabel A :
Select Sum(Nilai) SumNilaiB
>From B
Where NoUrut<( Select Max(Nilai) From A )
2. saya mo ambil jumlah seluruh nilai trans yg no urut trans nya di bawah
max(NoUrut_trans) tabel A :
Select Sum(Nilai) SumNilaiB
>From B
Where NoUrut<( Select Max(NoUrut) From A )
ali dharmala <[EMAIL PROTECTED]> wrote:
guys..
mo nanya perintah sql nya ni...
saya punya 2 tabel
tabel A isi nya
no trans no urut trans nilai tabel A
1 1 300
1 2 450
1 3 100
kalo saya select no_trans,max(urut_trans)
khan dapet 1 3
hasil nya saya mo join ke tabel B yg isi nya
no_trans no urut trans nilai trans
1 1 10
1 2 20
1 3 30
saya mo ambil jumlah seluruh nilai trans yg no urut
trans nya di bawah max(nilai_trans) tabel A
pertanyaan nya :
gmana join ke dua tabel diatas...
Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to
friends. http://mobile.yahoo.com/mail
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
[Non-text portions of this message have been removed]