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@smxi.com [firebird-support] <firebird-support@yahoogroups.com> 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
__._,_.___
Posted by: Louis Kleiman <lkleiman@sstms.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.
__,_._,___
No comments:
Post a Comment