Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: How to avoi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 11 Topic 9082 of 9520
Post > Topic >>

Re: How to avoid 2nd trigger

by Lennart <Erik.Lennart.Jonsson@[EMAIL PROTECTED] > Jul 14, 2008 at 09:44 AM

On Jul 14, 6:32 pm, Lennart <Erik.Lennart.Jons...@[EMAIL PROTECTED]
> wrote:
[...]
> ALTER TABLE EMP_SCREEN_EDIT ADD CONSTRAINT <NAME>
>     CHECK (  NOT ( JOB IN ('manager', 'superviser')) OR ( COMM = 0 AND
> EDLEVEL > 10 ) )
>

Perhaps I should have elaborated a bit more about this.

A => B is the same as NOT A OR B. In your case:

JOB IN ('manager', 'superviser') => ( COMM = 0 AND EDLEVEL > 10 )

can be rewritten as

(NOT JOB IN ('manager', 'superviser')) OR (COMM = 0 AND EDLEVEL > 10 )

/Lennart
 




 11 Posts in Topic:
How to avoid 2nd trigger
"lenygold via DBMons  2008-07-13 22:07:01 
Re: How to avoid 2nd trigger
Lennart <Erik.Lennart.  2008-07-14 00:00:13 
Re: How to avoid 2nd trigger
"lenygold via DBMons  2008-07-14 11:05:57 
Re: How to avoid 2nd trigger
Lennart <Erik.Lennart.  2008-07-14 05:24:44 
Re: How to avoid 2nd trigger
"lenygold via DBMons  2008-07-14 13:28:59 
Re: How to avoid 2nd trigger
Lennart <Erik.Lennart.  2008-07-14 07:13:34 
Re: How to avoid 2nd trigger
"lenygold via DBMons  2008-07-14 15:02:53 
Re: How to avoid 2nd trigger
Lennart <Erik.Lennart.  2008-07-14 09:32:06 
Re: How to avoid 2nd trigger
Lennart <Erik.Lennart.  2008-07-14 09:44:45 
Re: How to avoid 2nd trigger
"lenygold via DBMons  2008-07-14 17:10:17 
Re: How to avoid 2nd trigger
"lenygold via DBMons  2008-07-14 17:41:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:14:21 CST 2008.