Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie Trigger Syntax
Sorry, it was late when I wrote that. An alternative that came up on the
group later was using the EXISTS clause, which will eliminate the need for
an INTO clause, as well as the WHERE ROWNUM <= 1. When it evaluates to true,
the statement processes without doing anything. When FALSE, the same
NO_DATA_FOUND error is thrown. EXIXTS is "best practice", as well, which is
more important.
"Edmund" <edmund_mitchell_at_hotmail.com> wrote in message
news:a7359b21.0112010549.137a78ce_at_posting.google.com...
> "Forrest Cicogni" <fcicogni_at_sageasset.com> wrote in message
news:<1007147926.537486_at_news>...
>
> Thanks for your help, Forrest.
> I ran your code, and it complained about c.rownum - it said
> something like "No column named 'rownum' in table c'"
> which is true.
> You marked that it was important to have that code for some reason;
> it seems to me that you are making sure that there are not multiple
> return values, and maybe the syntax is wrong? (not that I know the
> correct
> syntax...)
> If that is the case - you needn't worry, because the employee_number
> and skill_number combination are the stated primary key for table c,
> so uniquness is already guaranteed.
> So, I ran the code without that line, input some values that would
> cause the error, the error message displayed properly, along with some
> other error messages that had me a little worried, but it seems to
> work fine!
>
> Many thanks
>
> Edmund
Received on Sat Dec 01 2001 - 10:44:47 CST