Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: create assertion?

Re: create assertion?

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Sun, 8 Sep 2002 00:05:13 +1000
Message-ID: <fzne9.26987$g9.76443@newsfeeds.bigpond.com>

Hi again Eugene,

Opened this post with some trepidation ;)

I think the error message suggests there is something wrong don't you think ?

Let me ask you a question. Do you really want to set the duedate for *ALL* rows to sysdate ? (which incidentally can be set directly to sysdate, duedate = sysdate, without the unnecessary inefficiency of calling it through dual).

I suspect not. I suspect you want to set duedate to sysdate for the row being inserted, no.

Therefore using the :OLD and :NEW column qualifiers might be in order. What are they ? You guessed it, read up about DML row level triggers in the Application Developers Guide.

If you read, play, learn, preserve; trust me you'll get there.

Cheers

Richard
"eugene kim" <eugene1977_at_hotmail.com> wrote in message news:alc6sv$2uq$1_at_newsreader.mailgate.org...
> got one more question..
> ... is anything wrong with my trigger?
>
>
> create trigger set_duedate after insert on orders
> for each row
> begin
> update orders set duedate = (select sysdate from dual)
> end set_duedate;
>
> -------------
> Warning: Trigger created with compilation errors.
> -------------
> ORA-04098: trigger 'EUGENE.SET_DUEDATE' is invalid and failed
 re-validation
>
>
Received on Sat Sep 07 2002 - 09:05:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US