Hi All,
Sorry for being a pain, I need to do an update script as below and insert the sum I'm retrieving when I run the script below I get the error group function is not allowed here, any ideas?
Many thanks
Sam
UPDATE sb_void_losses
SET sb_tot_rentloss =SUM (vtr_dr)
WHERE sb_prop_ref IN (
SELECT sb_prop_ref, pro_refno, SUM (vtr_dr)
FROM sb_void_losses, properties, void_transactions
WHERE sb_prop_ref = pro_propref(+)
AND pro_refno = vtr_pro_refno(+)
AND vtr_effective_date BETWEEN sb_void_date AND sb_let_date
GROUP BY sb_prop_ref, pro_refno)
Sorry for being a pain, I need to do an update script as below and insert the sum I'm retrieving when I run the script below I get the error group function is not allowed here, any ideas?
Many thanks
Sam
UPDATE sb_void_losses
SET sb_tot_rentloss =SUM (vtr_dr)
WHERE sb_prop_ref IN (
SELECT sb_prop_ref, pro_refno, SUM (vtr_dr)
FROM sb_void_losses, properties, void_transactions
WHERE sb_prop_ref = pro_propref(+)
AND pro_refno = vtr_pro_refno(+)
AND vtr_effective_date BETWEEN sb_void_date AND sb_let_date
GROUP BY sb_prop_ref, pro_refno)