Updating with NULL values + numbers
Good day,
Here is a query:
update rents as r set r.Debt = r.Deposit - (select sum(e.Total) from rents_extend as e where e.RentId = r.Id) + (select sum(f.Fee) from rents_fee as f where f.RentId = r.Id);
Not in all times in rents_extend or rents_fee we have rows, so usually one of these values is NULL.
I cannot use isnull() function here, because it is subquery.
How can I deal with it?
Subject
Written By
Posted
Updating with NULL values + numbers
February 26, 2012 05:55PM
February 27, 2012 04:58AM
February 28, 2012 09:46PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.