I have a i/p as '1,2,3,4' which comes as a string and i would the o/p of the funtion as
something like it.
The function i have written is :-
create or replace function f_c(text) returns int as '
declare ip alias for $1;
len int; pos int; sub int;
len := length(ip);
pos := position('','' in ip);
sub := cast(substr(ip,1,pos-1) as int);
select f_c('1,2,3); gives the result 1.
How should i get the result :-
Cursors can be used but how ?, if not what should be used ? Is there any way to use set of ? if yes , how /