On Thursday, December 30, 2004, 8:52:55 AM, Zamrony P Juhara wrote: > outputnya (kira-kira): > ========================= > nama | bulan | harga > ========================= > piring | januari | 1000 > piring | februari| 1000 > piring | maret | 1100 > piring | april | 900 > piring | agustus | 900 > mangkok | januari | 1000 > mangkok | februari| 1000 > mangkok | maret | 900
Saya baru inget, dulu pernah bikin program yang menggunakan db yang ndak mensupport stored procedure, cara yang barangkali lebih sederhana (bisa juga lebih rumit) adalah dengan membuat tabel baru yang berfungsi sebagai rekap, barangkali seperti: create table pricesumrz( years smallint not null, prod_id integer not null, lastyear currency, price_01 currency, price_02 currency, price_03 currency, price_04 currency, price_05 currency, price_06 currency, price_07 currency, price_08 currency, price_09 currency, price_10 currency, price_11 currency, price_12 currency, eofyear currency, primary key(years, prod_id) ); Nantinya, setiap ada perubahan harga yang terjadi pada produk, langsung dicatatkan juga pada rekap ini. Dengan demikian pada proses reporting nantinya dah ndak perlu hitung-hitung lagi, cukup ambil dari tabel ini dan yakin pasti lebih cepet. :-) -- Salam, -Jaimy Azle =========================================================== || Personal Weblogs: http://jaim.log.web.id || || Personal Delphi Weblogs: http://delphi.log.web.id || * Pengantar Pemrograman Database C/S, Delphi dan Firebird http://delphi.log.web.id/blogs/delphi/000152.html =========================================================== �Programming is like sex: one mistake and you have to support it for the rest of your life.� -- Michael Sinz ------------------------ Yahoo! Groups Sponsor --------------------~--> $4.98 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/i7folB/TM --------------------------------------------------------------------~-> Berlangganan: [EMAIL PROTECTED] Stop Berlangganan: [EMAIL PROTECTED] Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Delphindo/ <*> 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/
