I have a function in which there is a SQL statement -
select sum(shrtgpa_hours_earned)/sum(shrtgpa_hours_attempted) into stu_comp_rate
where shrtgpa_pidm = ipidm and
shrtgpa_term_code in ''' || ass_terms || ''';
The ass_terms ia a varchar2 and has a value of (201010,201020)
and ipidm is a number.
When I run the same query in command prompt I get a value for stu_compl_rate. However, in the function, the stu_compl_rate is NULL.