Calling an SQL function from within an Oracle trigger



Hello all

I have the following requirement:

Before insert or update on a table tableA, I need to check if the value
for fieldAtableA which is being inserted or updated in tableA is within
the range specified by two values from another table tableB.

I have a function which performs this check and returns me true if the
value falls within the range or false if it doesnt.

I want to have a trigger before insert or update on tableA which calls
this function. How do I call this function from the trigger and how can
I use the return value to either allow the insert/update or disallow
it?

Any suggestions will be greatly appreciated.

Thanks
Swetha

.



Relevant Pages

  • Re: Calling an SQL function from within an Oracle trigger
    ... Before insert or update on a table tableA, I need to check if the value ... I want to have a trigger before insert or update on tableA which calls ... I use the return value to either allow the insert/update or disallow ...
    (comp.databases.oracle.misc)
  • Re: Calling an SQL function from within an Oracle trigger
    ... Before insert or update on a table tableA, I need to check if the value ... for fieldAtableA which is being inserted or updated in tableA is within ... I want to have a trigger before insert or update on tableA which calls ... I use the return value to either allow the insert/update or disallow ...
    (comp.databases.oracle.misc)
  • Re: Calling an SQL function from within an Oracle trigger
    ... Before insert or update on a table tableA, I need to check if the value ... for fieldAtableA which is being inserted or updated in tableA is within ... I want to have a trigger before insert or update on tableA which calls ... I use the return value to either allow the insert/update or disallow ...
    (comp.databases.oracle.misc)
  • Re: Updating Identical tables
    ... What is a condition for INSERT/UPDATE Operations? ... UPDATE TableB SET UserId=...... ... INSERT INTO TableB SELECT columns FROM TableA ... I need to select fields data from ...
    (microsoft.public.sqlserver.tools)
  • Re: Calling an SQL function from within an Oracle trigger
    ... Before insert or update on a table tableA, I need to check if the value ... I want to have a trigger before insert or update on tableA which calls ... I use the return value to either allow the insert/update or disallow ... Your best source for information on how to code triggers is probably ...
    (comp.databases.oracle.misc)