Re: Please help in creating a trigger

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 5 Sep 2002 15:32:41 -0700
Message-ID: <92eeeff0.0209051432.532a2184_at_posting.google.com>


Galina.Self_at_cityofbristol.ac.uk (Galina) wrote in message news:<af2b7239.0209050634.17f51afd_at_posting.google.com>...
> Hello
> We use Oracle 8 database in our college. An Oracle application from
> outside supplier enables us to enrol students. Enrolments are
> processed from many PCs on WAN, which includes several sites.
> Recently the system started to behave a bit naughty: one very
> important parameter, number of PC, on which the enrolment is
> processed, SOMETIMES is not recorded in the database.
> I need to create a trigger, which would have fired, if in the record
> being inserted into the table there is NULL in the field, where should
> be computer number. Ideally, I'd like to get this number (to read from
> a file, for example), to insert it into the record and only then to
> insert the record into the table. Is this possible? If yes, would you
> mind to point me in the direction of a trigger code, which I could use
> as an example.
> If Oracle trigger cannot be programmed to read from a file, another
> appropriate action would be to cancel inserting the record and to show
> a message on the screen prompting the user to click SAVE button once
> more. A sample of trigger code would be very appreciated.
> Thank you.
> Galina

Why not make the column NOT NULL.

//Rauf Sarwar Received on Fri Sep 06 2002 - 00:32:41 CEST

Original text of this message