Subject Re: [firebird-support] TRIGGER: Recording Integer instead of Numeric(4,2)
Author Carol Milius
Hi 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 why
> you need to update every record once for every record in the table.

This was my first Trigger and after a few tests I realized that a Where clausule were missing.
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:
>
> After Update Table1 the Table2 needs some processing.
>
> The trigger below is recording (posting) Integer instead of Numeric(4,2).
>
> Any sugestions?

Yes. Could you restate the problem. What your procedure below appears
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