Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,079 of 2,288    |
|    Kenneth Koenraadt to mstenzler@ssaris.com    |
|    Re: trigger puzzlement    |
|    12 Feb 04 20:40:14    |
      XPost: comp.databases.oracle.server              Hi Mike,              Please post the exact ORA- error message next time.              I tried to recreate, and I got the error below, which I belive you got       too. But it has nothing to do with locks.              ORA-01403: no data found       ORA-06512: ved "A.AUROW_GRID_CLONE", linje 6       ORA-04088: fejl under udf°relse af triggeren 'A.AUROW_GRID_CLONE'              Which means that your intitial check returns no row => no data found       to put into v_exists => exception is raised. This is the expected       behaviour.              What you need to do is to catch that exception and handle it       appropriately. You could also make your check more readable (and even       prettier), like this :              begin       select 1        into dummy_var        from test.t2       where trunc(last_date) = trunc(sysdate); --today       and cmdy = :new.cmdy_sym;              -- No exception, There was exactly one row, do the update here       exception       when no_data_found then        -- there was no record for today, do the insert here.       when too_many_rows then        -- Something went terribly wrong !        raise;       end;                     - Kenneth Koenraadt                                                        On Thu, 12 Feb 2004 14:52:18 -0500, "Mike Stenzler"        |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca