On Sun, Jan 15, 2012 at 12:17 PM, plasmasoftware net <administrator@xxxxxxxxxxxxxxxxxx> wrote:
select j.kode_barang kode_barang,j.isi_Satuan from J_master_barang j order by j.kode_barang ascdisplaykode isi00000000000001 2400000000000001B 1200000000000001C 1i want to make that become when i select my table.how to make this.kode isi_A isi_B isi_C00000000000001 24 12 1
select '000000000001' as Kode, sum(case when j.kode_barang='A' then isi else 0 end) as isi_A,
sum(case when j.kode_barang='B' then isi else 0 end) as isi_B,
sum(case when j.kode_barang='C' then isi else 0 end) as isi_C from j_master_barang;