Re: needing help from the PL/SQL experts

From: Andrew KEATING <gcl.ak_at_axess.com>
Date: Tue, 6 Oct 1998 18:32:56 -0400
Message-ID: <6ve5kf$4pn$1_at_news2.tor.accglobal.net>


Shouldn't your trigger be at column level ?

burwelm_at_my-dejanews.com wrote in message <6vdvvm$pjs$1_at_nnrp1.dejanews.com>...
>OK... So I have a database trigger that needs to assign values to some
>columns. But only when the transaction statement is not assigning them.
>Specifically..
>
>date_created, created_by, date_modified, modified_by
>
>When the sql statement does not include these columns, my trigger needs to
>assign sysdate and user, but if the sql statement does include them then
the
>trigger should do nothing.
>
>My trigger logic for all columns is modeled as follows:
> if :new.date_created is null then
> :new.date_created := sysdate;
> end if;
>
>The problem is that it is trully testing for the VALUE NULL rather then
>whether the sql statement includes that column. And it does not execute
the
>logic appropriately.
>
>Any help out there from the PL/SQL experts.
>
>Melissa
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Wed Oct 07 1998 - 00:32:56 CEST

Original text of this message