! CODEBANK 2012 !
İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.
ÖNEMLİ AÇIKLAMA: MUTLAKA OKUYUNUZ!
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
SET TERM ^ ; CREATE TRIGGER ILK_TR FOR TBL_SATISACTIVE BEFORE UPDATE POSITION 0ASdeclare variable miktar DECIMAL(15,2);beginif (new.FIATI<>old.fiati) thenbeginif (old.fiati>new.FIATI) thenbeginmiktar=old.fiati-new.FIATI;update tbl_musteri settbl_musteri.toplam_harcadigi= tbl_musteri.toplam_harcadigi-:miktarwhere tbl_musteri.sira=new.FOREGNKEY;endif (old.fiati<new.FIATI) thenbeginmiktar=new.FIATI-old.fiati;update tbl_musteri settbl_musteri.toplam_harcadigi= tbl_musteri.toplam_harcadigi+:miktarwhere tbl_musteri.sira=new.FOREGNKEY;endend end^SET TERM ; ^
CREATE TRIGGER SIL_TR FOR TBL_SATISACTIVE AFTER DELETE POSITION 0ASbeginupdate tbl_musteri settbl_musteri.toplam_harcadigi= tbl_musteri.toplam_harcadigi-old.fiatiwhere tbl_musteri.sira=old.FOREGNKEY;end
CREATE TRIGGER EKLE_TR FOR TBL_SATISACTIVE BEFORE INSERT POSITION 0ASbeginupdate tbl_musteri settbl_musteri.toplam_harcadigi= tbl_musteri.toplam_harcadigi+new.fiatiwhere tbl_musteri.sira=new.FOREGNKEY;end
POST_EVENT "ismi";
POST_EVENT "yeniKayıtEklendi";
POST_EVENT NEW.ALANADI;
CREATE TRIGGER tr_kayit FOR TBL_MUSTERI ACTIVE AFTER INSERT POSITION 0 AS begin post_event 'KAYIT_DEGISTI'; end
ALTER TRIGGER TR_KAYITACTIVE AFTER DELETE POSITION 5ASbeginpost_event 'KAYIT_DEGISTI';end
DROP TRIGGER ADI;
DROP TRIGGER TR_KAYIT;