Hi,
everyone
I create a function as follows :
drop function convid!
create function convid(id varchar(25))
returns char(15)
begin atomic
return
case
when length(ltrim(rtrim(id)))=18 then substr(id,1,6)||substr(id,9,9)
when length(ltrim(rtrim(id)))=15 then id
else null
end;
end!
The function convid will be used in many place ,for example
update bd_psndoc set ts=? where (psnclscope=0 or psnclscope=1) and pk_psndoc in (select pk_psndoc from bd_accpsndoc where convid(id)=?)
I found the perfomance is not well,so I want to create function index for convid via index extender,can i achiveve?
Any one help me