Menurut pendapat saya penggunaan Row level trigger akan membuang resource yang tidak perlu (setiap 1 record trigger fire) saran saya untuk kasus seperti ini computasi seharusnya di lakukan setelah selesai transaksi, tidak untuk setiap kali ada record yang di insert.
Cara anda bisa berhasil jika dalam 1 transaksi anda cuman insert 1 record, bagaimana kalo 2 record...nilai :NEW cuman dapet yang terakhir. kecuali anda mau tiap insert 1 record commit (yang buang2 resource lagi), cara ini gak akan berhasil 2008/7/16 Oscar Wilyanto <[EMAIL PROTECTED]>: > Setau saya, kalau triggernya jenis INSERT /UPDATE FOR EACH ROW, nilai > reference :NEW -nya selalu ada (tidak null), jadi dikasus ini kalo mau ambil > record paling barunya bisa pakai :NEW.tot_qty aja. CMIIW > > > ----- Original Message ----- > From: Yoel Susanto > To: [email protected] <indo-oracle%40yahoogroups.com> > Sent: Wednesday, July 16, 2008 10:07 AM > Subject: Re: [indo-oracle] error mutating trigger > > bisa kasih contoh? > setau saya PRAGMA nya tidak bisa mengambil record yang paleng baru. > > misal: > > 55 01/05/08 1 A 2 100 200 > > 55 01/05/08 2 A 1 50 50 --> pada saat Anda insert ini, trigger nya cuman > bisa melihat record yang pertama. akhirnya hasilnya cuman TOT_QTY=200 > > 2008/7/16 Oscar Wilyanto <[EMAIL PROTECTED] <oscar%40mkdgroup.com>>: > > > Menurut saya yg paling mudah, gunakan saja PRAGMA > > AUTONOMOUS_TRANSACTION, baru kemudian diakhir triggernya di COMMIT. > > > > Oscar > > > > > > ----- Original Message ----- > > From: Ferry Setiawan > > To: [email protected] <indo-oracle%40yahoogroups.com><indo-oracle% > 40yahoogroups.com> > > Sent: Wednesday, July 16, 2008 9:21 AM > > Subject: Re: [indo-oracle] error mutating trigger > > > > saya juga pernah mengalami mutating, dan cara yang saya tahu adalah tidak > > menggunakan for each row dalam trigger tersebut (CMIIW) > > > > Ferry S > > > > Pada tanggal 16/07/08, risty <[EMAIL > > PROTECTED]<deny_risty%40kudus.puragroup.com> > <deny_risty%40kudus.puragroup.com>> > > menulis: > > > > > > pak Yoel... > > > pada prinsipnya table_a adalah tabel detil utk menampung data packing > > suatu > > > produk yang mana yang membedakan selain no urut adalah jumlah BOX dan > ISI > > > sehigga akan mendapat total TOT_QTY ( box x isi). Dari situ data akan > > > otomatis masuk ke table_b lewat trigger dalam bentuk rekap > quantitasnya. > > > Adakah struktur yg harus di pisah lagi ?? Apakah harus menggunakan > > variable > > > array dalam triggernya utk menampung summary qty nya?? Mohon solusi dan > > > bimbingannya > > > thq sebelumnya....... > > > > > > > > > ----- Original Message ----- > > > From: Yoel Susanto > > > To: [email protected] > > > <indo-oracle%40yahoogroups.com><indo-oracle% > 40yahoogroups.com> > > > Sent: Tuesday, July 15, 2008 5:51 PM > > > Subject: Re: [indo-oracle] error mutating trigger > > > > > > > > > Hi Risty, > > > > > > Saya mau tanya mengenai business procedurenya., karena mungkin anda > > > melakukan sesuatu yang tidak perlu. > > > Apa yang membedakan record berikut, sehingga mereka harus dipisah > > > berdasarkan no urutnya?? > > > Saya liat no_trans, tgl trans, item sama semua, kenapa kalau ini adalah > > > satu > > > transaksi mereka harus dipisah recordnya > > > > > > 55 01/05/08 1 A 2 100 200 > > > 55 01/05/08 2 A 1 50 50 > > > > > > 2008/7/15 risty <[EMAIL PROTECTED]<deny_risty%40kudus.puragroup.com> > <deny_risty%40kudus.puragroup.com> > > >: > > > > > > > Dear all masters... > > > > > > > > saya adalah pemula oracle,bagaimana menghindari error mutating > trigger > > > > bilamana triggenya mengakumulasi qty dari table_a itu sendiri > > > > > > > > mis: table detil_a > > > > > > > > no_trans tgl_tans no_urut item box isi tot_qty > > > > ------------ ------------ ----------- -------- ------ ---- --------- > > > > 55 01/05/08 1 A 2 100 200 > > > > 55 01/05/08 2 A 1 50 50 > > > > 56 01/05/08 1 B 1 200 200 > > > > > > > > akan otomatis di insert ke table_b lewat trigger > > > > > > > > no_trans tgl_tans item tot_qty > > > > ------------ ------------ ------- ------- > > > > 55 01/05/08 A 250 > > > > 56 01/05/08 B 200 > > > > > > > > Harus seperti apa trigger yg harus dibuat, mohon solusinya?? > > > > > > > > thx > > > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Yoel Susanto > > > > > > www.indo-oracletech.com > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > ------------------------------------ > > > > > > -- > > > -----------I.N.D.O - O.R.A.C.L.E--------------- > > > Keluar: [EMAIL PROTECTED]<indo-oracle-unsubscribe%40yahoogroups.com> > <indo-oracle-unsubscribe%40yahoogroups.com> > > > > Website: http://indooracle.wordpress.com > > > ----------------------------------------------- > > > > > > Bergabung dengan Indonesia Thin Client User Groups, > > > Terminal Server, Citrix, New Moon Caneveral, di: > > > http://indo-thin.blogspot.comYahoo! Groups Links > > > > > > > > > > > > > > > > [Non-text portions of this message have been removed] > > > > <br> > > <br> > > <table width="100%"> > > <tr> > > <td> > > ----------------------------------------------------------<br> > > This message contains confidential information and is intended only for > the > > individual named. If you are not the named addressee you should not > > disseminate, distribute or copy this e-mail. Please notify the sender > > immediately by e-mail if you have received this e-mail by mistake and > delete > > this e-mail from your system. E-mail transmission cannot be guaranteed to > be > > secure or error-free as information could be intercepted, corrupted, > lost, > > destroyed, arrive late or incomplete, or contain viruses. MKD Group > > therefore does not accept liability for any errors or omissions in the > > contents of this message, which arise as a result of e-mail transmission. > If > > verification is required please request a hard-copy version. > > <br><br> > > MKD Group, www.mkdgroup.com<br> > > ----------------------------------------------------------<br> > > </td> > > </tr> > > </table> > > > > [Non-text portions of this message have been removed] > > > > > > > > -- > Cheers, > Yoel Susanto > > www.indo-oracletech.com > > [Non-text portions of this message have been removed] > > <br> > <br> > <table width="100%"> > <tr> > <td> > ----------------------------------------------------------<br> > This message contains confidential information and is intended only for the > individual named. If you are not the named addressee you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately by e-mail if you have received this e-mail by mistake and delete > this e-mail from your system. E-mail transmission cannot be guaranteed to be > secure or error-free as information could be intercepted, corrupted, lost, > destroyed, arrive late or incomplete, or contain viruses. MKD Group > therefore does not accept liability for any errors or omissions in the > contents of this message, which arise as a result of e-mail transmission. If > verification is required please request a hard-copy version. > <br><br> > MKD Group, www.mkdgroup.com<br> > ----------------------------------------------------------<br> > </td> > </tr> > </table> > > [Non-text portions of this message have been removed] > > > -- Cheers, Yoel Susanto www.indo-oracletech.com [Non-text portions of this message have been removed]

