My function code looks like the following:
-------------------------------------------
function Func as int
begin
...
select @seq=max(substring(id,3,8)) from TB1
set @seq = @seq +1
end
....
return @seq
-------------------------------------------
the sql statement is
------------------------------------------
insert into TB1 (F1,id) select V1, Func() from TB2
------------------------------------------
The...