Subject | Re: [firebird-support] Dividing one column by another |
---|---|
Author | |
Post date | 2016-12-12T09:11:41Z |
There are no NULL values in either of the columns (that was my first thought). The table structure is
TABLEA
URN: VARCHAR(12)
LINKURN: VARCHAR(12) [Links to TABLEB.ID]
AMOUNT: DOUBLE PRECISION
TABLEB
URN: VARCHAR(12)
VALUE: DOUBLE PRECISION
so the query is
SELECT A.AMOUNT, B.VALUE, A.AMOUNT/B.VALUE
FROM TABLE1 A
JOIN TABLE2 B ON A.LINKURN = B.URN