*union all *- kan aja dari hasil select di  masing2 table (A,B,C)

select id_company,bayar
from table_A
where cara_bayar  = 'tunai'
union all
select id_company,bayar
from table_B
where cara_bayar  = 'tunai'
union all
select id_company,bayar
from table_C
where cara_bayar  = 'tunai'


klo pengen di sum bayar nya tiap id_company..
jadikan query union diatas jadi subquery lagi..
trus ente group by id_company, selanjut tinggal meng-sum field bayar..

semoga membantu


2010/6/22 wendi gunawan <[email protected]>

> *union all *- kan aja dari hasil select di  masing2 table (A,B,C)




-- 
wendi gunawan
Java Software Developer & penulis (new bie)
terus belajar untuk tidak cinta dunia
http://oretanwendi.wordpress.com/
hp:085624046906


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

Kirim email ke