The database calculated field not updated, for example total= qte*price when qte or price are updated

176 Views Asked by At

I designed a Firebird table as below:

CREATE TABLE LINES
(
    PK bigint NOT NULL,
    NDOC bigint,
    NART bigint,
    CLOT varchar(10),
    DATE_PER date,
    QTE numeric(18,2),
    Price numeric(7,2),
    PPA numeric(7,2),

    CONSTRAINT PK_LIGNES_0 PRIMARY KEY (PK)
);

ALTER TABLE LINES ADD MNT COMPUTED BY (qte*price);

The data is shown in a dbgrid; when I update qte or price the field MNT does not get updated.

0

There are 0 best solutions below