cursor cur_sum_rest (wps_code d_wp_fond_wp.wfw_wps_code%type, rest_sum number) is select wfw_wps_code_teil
from d_wp_fond_wp
where wfw_wps_code = wps_code and wfw_wps_code_teil = 'N/A' and sum(wfw_anteil) = rest_sum
for update of wfw_gruppe;
i want to get id's of the combination which makes the sum that i give to the cursor. so if rest_sum is 30 i want to get this wfw_wps_code_teil's which together make the sum of 30. my problem is that its not allowed to use
sum(wfw_anteil) in the where clausel. is there a possibility to solve this another way? thnx for the help
kemo
from d_wp_fond_wp
where wfw_wps_code = wps_code and wfw_wps_code_teil = 'N/A' and sum(wfw_anteil) = rest_sum
for update of wfw_gruppe;
i want to get id's of the combination which makes the sum that i give to the cursor. so if rest_sum is 30 i want to get this wfw_wps_code_teil's which together make the sum of 30. my problem is that its not allowed to use
sum(wfw_anteil) in the where clausel. is there a possibility to solve this another way? thnx for the help
kemo