Professional Documents
Culture Documents
varchar2,type in varchar2)
return varchar2
is
--
/*--------------------------------------------------------------------------------
--------------------------*/
--/*--created by : venkatesan s
--------------------------------------------------------------------*/
--/*--datelastmodified : 02-mar-2008
---------------------------------------------------------------------*/
--/*--purpose : to extract the servicegroup_id ,hub and headend from
the servicegroup field ----*/
--/* given in the source file as in combined format
----------------------------------*/
--/* the delimiter used to split the data is '.' (dot)
-------------------------------*/
--/*--version : 1.0
-----------------------------------------------------------------------------*/
--/*--sample : select
func_splitstreamingzone_tsid('tucson.40447','streamingzone') from dual; --*/
--
/*--------------------------------------------------------------------------------
--------------------------*/
begin
--
/*--------------------------------------------------------------------------------
--------------------------*/
--/*------to check whether user requested type which is listed in function
-----------------------------------*/
--
/*--------------------------------------------------------------------------------
--------------------------*/
raise others;
end if;
--
/*--------------------------------------------------------------------------------
--------------------------*/
--/*------if the user requested streamingzone as type then it will returns
streamingzoneid as output------------*/
--
/*--------------------------------------------------------------------------------
--------------------------*/
begin
v_streamingzone := substr(streamingzone,1,instr(streamingzone,'.',1,1)-1);
return v_streamingzone;
end;
end if;
--
/*--------------------------------------------------------------------------------
--------------------------*/
--/*------if the user requested tsid as type then it will returns tsid as
output------------------------*/
--
/*--------------------------------------------------------------------------------
--------------------------*/
begin
v_streamingzone := substr(streamingzone,instr(streamingzone,'.',1,1)+1);
return v_streamingzone;
end;
end if;
--
/*--------------------------------------------------------------------------------
--------------------------*/
--/*------to raise the application error if the input variable type is not in the
listed types ---------------*/
--
/*--------------------------------------------------------------------------------
--------------------------*/
exception
end;