Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Got those old Mutation Blues
Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in message news:<548hvtkn0t98ud5labi5q3de16tlronq13_at_4ax.com>...
> On 18 Nov 2001 17:03:45 -0800, rshea_at_my-deja.com (Richard Shea) wrote:
>
[Original question (written by me) snipped]
Hi Sybrand -
>
>
> You are selecting from the table you are mutating. What you are
> selecting doesn't matter at all, you are selecting. So you get the
> mutating table error.
OK - I thought the id != :new.id idea _might_ have worked, I live in hope ;-)
> From your problem description it looks like either your PK is
> incorrect, or you are trying to simulate the unique constraint.
> In that case you'd better impose one (on personid, startdatetime,
> enddatetime).
>
Yeah although of course to avoid overlaps the 'unique' is more like 'non-intersecting sets of minutes' which makes it a little more tricky than usual. Having read the thread through I think I'll attempt this with the 'after-statement trigger reading a table created in a before-insert-update trigger'.
thanks for your thoughts
richard shea.
> Hth
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Wed Nov 21 2001 - 04:19:06 CST
![]() |
![]() |