Minimorgie
Technical User
Hi,
I am trying to update a table from two other tables and I am having trouble with the second sum where the total produced is null, it makes the total for the field concerned (april_actual) null even though the first part of the sum has inserted a value. I've tried using the isnull command but this doesn't help. The SQL following is what I am using
update part2_totals
set april_actual =(select sum(firm_units) from part2_mfrent where firm_handover between
'01-apr-2004' and '30-apr-2004') +
(select sum(firm_units) from part2_mfsale where firm_handover between
'01-apr-2004' and '30-apr-2004')
Any help would be appreciated.
Minimorgie
I am trying to update a table from two other tables and I am having trouble with the second sum where the total produced is null, it makes the total for the field concerned (april_actual) null even though the first part of the sum has inserted a value. I've tried using the isnull command but this doesn't help. The SQL following is what I am using
update part2_totals
set april_actual =(select sum(firm_units) from part2_mfrent where firm_handover between
'01-apr-2004' and '30-apr-2004') +
(select sum(firm_units) from part2_mfsale where firm_handover between
'01-apr-2004' and '30-apr-2004')
Any help would be appreciated.
Minimorgie