|Subject||Re: [firebird-support] Dividing one column by another|
We probably need to see the table structures, but NULL handling can be tricky. You may want to do something along the lines of
Coalesce(A.AMOUNT, 0)/Coalesce(B.VALUE, 1) to get something back when either of your source values is NULL.
On Fri, Dec 9, 2016 at 1:26 PM Russell Weetch russell@... [firebird-support] <firstname.lastname@example.org> wrote:I am trying to divide one column in table A by another in table B, but it just gives me null values. The query isSELECT A.AMOUNT, B.VALUE, A.AMOUNT/B.VALUEFROM TABLE1 AJOIN TABLE2 B ON A.URN = B.URNany ideas gratefully received.Russell