Subject Re: [firebird-support] computed field
Author Nando Dessena

w> I have a table as follow, the price field is a computed field,
w> if qty is not zero, everything works fine, but if it's zero, an
w> arithmetic exception will occur, is there a way to avoid that
w> computed field when qty is zero?

if you use Firebird 1.5 you can use the case function. For example:

PRICE computed by (case QTY when 0 then 0 else AMT / QTY end)

Nando Dessena
I support Firebird, I am a Firebird Foundation member!
Join today at