create or replace function func_calculate_channel_sde (bitrate float) return integer is -/*---------------------------------------------------------------------------------------------------------*/ --/*--created by : venkatesan s --------------------------------------------------------------------*/ --/*--datelastmodified : 02-mar-2008 ---------------------------------------------------------------------*/ --/*--purpose : to caclcualate the channel sde according to the bit rate ------------------------*/ --/*--version : 1.0 -----------------------------------------------------------------------------*/ --/*--sample : select func_calculate_channel_sde(5) from dual; ---------------------------------*/ -/*---------------------------------------------------------------------------------------------------------*/ v_sde integer; begin if (bitrate < 6) then v_sde := 1; return v_sde; elsif (bitrate = 15) then v_sde := 4; return v_sde; elsif (bitrate = 19) then v_sde := 5; return v_sde; end if; return v_sde; end; /