I'm trying to get the most repeating value on my report so i in formula column I do
function cf_mostrepfomula return char is
ret_val1 varchar2(20);
ret_val2 vachar2(20);
begin
select test_result,count(test_result) testcount into ret_val1,ret_val2
from lab_trx_details
where test-id=:test_id
and branch_id =:branch_id
having (count(test_result)>1)
group by test_result
order by test_count
if ret_val1 is not null then
return(ret_val1);
else
retun 0;
end if;
end;
Software/Hardware used:
oracle report
ASKED:
June 2, 2012 6:41 PM