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

Home -> Community -> Usenet -> c.d.o.misc -> Re: CONSTRAINT and user defined Function

Re: CONSTRAINT and user defined Function

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 23 Aug 2002 16:52:31 GMT
Message-ID: <3D66683E.AEF93C1A@exesolutions.com>


Marcin Zawadzki wrote:

> I've got a problem.
> I wanted to use my own function in check constraint statement, but Oracle do
> not recognize my function name.
>
> The problem is:
> I have a table like that:
>
> ID APLICATION MAIN
> 1 app1 T
> 2 app2 T
> 2 app1 F
> 3 app1 T
> 3 app3 F
> 3 app4 T
>
> And have to check if there is only one main application (main = 'T') per
> user.
>
> Please HELP !
>
> MZ

For what you are trying to do a check constraint is not appropriate. Put your code into a trigger.

Daniel Morgan Received on Fri Aug 23 2002 - 11:52:31 CDT

Original text of this message

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