Hi All,
Am basically from oracle, i have a function with cursor here i have created in oracle. May you please help me in modifying this into sqlserver. FUNCTION
fun_din (id IN NUMBER, dim IN VARCHAR2 DEFAULT ' < ')
RETURN VARCHAR2
IS
param varchar2(2000);
cursor c1 is
select name
from (select id, inf
from task
start with id = pid
connect by prior pid = id) ids
left join info on task.id = info.inf;
BEGIN
for c2 in c1
loop
if length(param) > 0 then
param := dim || param;
end if;
param := c2.dim || param;
end loop;