Subject | computed field |
---|---|
Author | wang960 |
Post date | 2004-08-08T09:06:55Z |
Hi,
I have a table as follow, the price field is a computed field,
if qty is not zero, everything works fine, but if it's zero, an
arithmetic exception will occur, is there a way to avoid that
computed field when qty is zero?
Thanks,
Frank
CREATE TABLE DTL(
RRNO UREFNO NOT NULL,
QTY UNUMERIC DEFAULT 0 NOT NULL,
AMT UNUMERIC DEFAULT 0 NOT NULL,
PRICE COMPUTED BY (AMT/QTY),
);
I have a table as follow, the price field is a computed field,
if qty is not zero, everything works fine, but if it's zero, an
arithmetic exception will occur, is there a way to avoid that
computed field when qty is zero?
Thanks,
Frank
CREATE TABLE DTL(
RRNO UREFNO NOT NULL,
QTY UNUMERIC DEFAULT 0 NOT NULL,
AMT UNUMERIC DEFAULT 0 NOT NULL,
PRICE COMPUTED BY (AMT/QTY),
);