Subject Re: [ib-support] problem with Employee database
Author Ernesto Cullen
I've seen the constraint (named INTEG_54), but it says

CHECK (percent_change between -50 and 50)

and, as far as I can see, if you do update column old_salary to any value,
column percent_change doesn't change... the value is in range as it is in
the table.
Besides... i can't see where the error message
'validation error for column OLD_SALARY, value "0.00 "'
comes from

Ernesto Cullen
Parana - Entre Rios - Argentina
http://mcgilbert.netfirms.com

----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <ib-support@yahoogroups.com>
Sent: Friday, August 16, 2002 9:36 PM
Subject: Re: [ib-support] problem with Employee database


> If you inspect the metadata surrounding this table, you'll see that it has
> a CHECK constraint on PERCENT_CHANGE that affects the relationship between
> OLD_SALARY and the computed column NEW_SALARY.
>
> If I do
> update salary_history
> set old_salary=0.00
> where emp_no=20
>
> then I get your error:
> ISC ERROR MESSAGE:
> validation error for column OLD_SALARY, value "0.00 "
>
> because the requested change violates the CHECK constraint.
>
> If I do
> update salary_history
> set old_salary=85500.00
> where emp_no=20
>
> then there is no error, because the change to old_salary keeps the
> percent_change within the range restricted by the CHECK constraint.
>
> heLen