u/ merubah harga
Update ABC set harga = 3000 where code2 = 'A1' and urut = 2;
u/ merubah nama barang sekaligus memberi no urut
1. Update ABC set code2 = 'C1', barang = 'BARANG C', urut = (select
nvl(max(urut),0)+1
from ABC where code2 = 'C1')
where code2 = 'A1' and urut = 2;
2. Update ABC set code2 = 'B1', barang = 'BARANG B', urut = (select
nvl(max(urut),0)+1
from ABC where code2 = 'B1')
where code2 = 'A1' and urut = 2;
regards,
AWAL
----- Original Message -----
From: "aly rmb" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, May 12, 2006 7:22 PM
Subject: [indo-oracle] Bikin trigger
> Sorry klo pertanyaan spt ini sudah pernah mampir.
>
> table ABC
> --------------
> Code1 Code2 Barang Urut Harga
> ------------------ ------- ---------- ------ ---------
> AAA A1 BARANG A 1 1000
> AAA A1 BARANG A 2 2000
> AAA B1 BARANG B 1 5000
> AAA B1 BARANG B 2 3000
>
> Setiap ada penambahan/perubahan di table ABC, colomn urut slalu +1
> Pertanyaannya :
> Bagaimana cara bikin Triggernya untuk merubah baris ke 2 yg tadinya
HARGA = 2000 menjadi 3000 tanpa merubah colomn urut ?
> atau merubah baris ke 2, BARANG A menjadi BARANG C berarti urut = 1
> atau merubah baris ke 2, BARANG A menjadi BARANG B berarti urut = 3
> dan sebaiknya triger itu di level Form, Block atau di mana ya ?
> makasih atas bantuannya ....
> tks/aly
--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.lizt.org (NEW)
-----------------------------------------------
Bergabung dengan Indonesia Thin Client User Groups,
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com
YAHOO! GROUPS LINKS
- Visit your group "indo-oracle" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

