ada yang bisa bantu??
gini,
saya ad permasalahan,
saya sudah nampilin data kya gini :

Number of downloads: 21
saya pengen nampilin data kya gini :

Number of downloads: 24
apakah ada pencerahan??
terimakasih. . .
Posted 19 February 2013 - 09:12 PM
alvina, on 19 February 2013 - 12:34 PM, said:
CREATE OR REPLACE VIEW view_penyusutan_gol_per_tahun AS SELECT G.kd_gol, G.ur_gol, SUM(IF(thn_ang='2006',FLOOR(M.rph_aset),0)) AS 'thn_2006', SUM(IF(thn_ang='2007',FLOOR(M.rph_aset),0)) AS 'thn_2007', SUM(IF(thn_ang='2008',FLOOR(M.rph_aset),0)) AS 'thn_2008', SUM(IF(thn_ang='2009',FLOOR(M.rph_aset),0)) AS 'thn_2009', SUM(IF(thn_ang='2010',FLOOR(M.rph_aset),0)) AS 'thn_2010', SUM(IF(thn_ang='2011',FLOOR(M.rph_aset),0)) AS 'thn_2011', SUM(M.rph_aset) AS Total FROM dbbmn10.t_masterhm M, t_gol_umeko G WHERE G.kd_gol = SUBSTR(M.kd_brg,1,1) AND M.thn_ang != '0' GROUP BY G.ur_gol ORDER BY G.kd_gol ASC
Posted 19 February 2013 - 10:51 PM
mrkoeh, on 19 February 2013 - 09:12 PM, said:
CREATE OR REPLACE VIEW view_penyusutan_gol_per_tahun AS SELECT G.kd_gol, G.ur_gol, SUM(IF(thn_ang='2006',FLOOR(M.rph_aset),0)) AS 'thn_2006', SUM(IF(thn_ang='2007',FLOOR(M.rph_aset),0)) AS 'thn_2007', SUM(IF(thn_ang='2008',FLOOR(M.rph_aset),0)) AS 'thn_2008', SUM(IF(thn_ang='2009',FLOOR(M.rph_aset),0)) AS 'thn_2009', SUM(IF(thn_ang='2010',FLOOR(M.rph_aset),0)) AS 'thn_2010', SUM(IF(thn_ang='2011',FLOOR(M.rph_aset),0)) AS 'thn_2011', SUM(M.rph_aset) AS Total FROM dbbmn10.t_masterhm M, t_gol_umeko G WHERE G.kd_gol = SUBSTR(M.kd_brg,1,1) AND M.thn_ang != '0' GROUP BY G.ur_gol ORDER BY G.kd_gol ASC