Subject | Re: [firebird-support] TRIGGER: Recording Integer instead of Numeric(4,2) |
---|---|
Author | Carol Milius |
Post date | 2005-06-21T13:36:49Z |
Hi Ann!
I´ve heard you soon will be here in Brazil!
Great News!
Fixed up.
The datatype in TABLE2 is Numeric(4,2).
As a smart guys from fb lists in Brazil told me, the trick was the operation (Interger / Numeric = Integer).
Changing that, the decimals were writen.
Thanks!
Carol.
Carol Milius wrote:
to do is, after an update of TABLE1, if the value of UA changes
For each record in TABLE2
select the values of two fields
update all records in TABLE2 setting
UA field = the selected value from the outer loop
divided by the new value from TABLE1
I don't know the data type of the UA field in TABLE2, or why
you need to update every record once for every record in the table.
Regards,
Ann
I´ve heard you soon will be here in Brazil!
Great News!
> I don't know the data type of the UA field in TABLE2, or whyThis was my first Trigger and after a few tests I realized that a Where clausule were missing.
> you need to update every record once for every record in the table.
Fixed up.
The datatype in TABLE2 is Numeric(4,2).
As a smart guys from fb lists in Brazil told me, the trick was the operation (Interger / Numeric = Integer).
Changing that, the decimals were writen.
Thanks!
Carol.
Carol Milius wrote:
>Yes. Could you restate the problem. What your procedure below appears
> After Update Table1 the Table2 needs some processing.
>
> The trigger below is recording (posting) Integer instead of Numeric(4,2).
>
> Any sugestions?
to do is, after an update of TABLE1, if the value of UA changes
For each record in TABLE2
select the values of two fields
update all records in TABLE2 setting
UA field = the selected value from the outer loop
divided by the new value from TABLE1
I don't know the data type of the UA field in TABLE2, or why
you need to update every record once for every record in the table.
Regards,
Ann