Interview Question in SQL Server Indexing
Interview Question :: Can you explain for me this code
This code is written in PL/SQL any one can give me brief description about it? any thoughts will be appreciated.
TYPE t_RtsReasons IS TABLE OF t_RtsReason INDEX BY BINARY_INTEGER;
PROCEDURE get_rts_reasons(p_Mag IN NUMBER, p_RtsReasons OUT t_RtsReasons) IS
CURSOR C IS
select
palcent,
pallibl
from
parlgene@tpx
where
palnmag=p_Mag and
palctab=30 and
palcent between 500 and 599 and
pallang=
(select
parlibc
from
pardgene@tpx
where
parnmag=palnmag and
parctab=726 and
parcent=1)
order by
palcent;
i NUMBER(9):=1;
BEGIN
FOR R IN C LOOP
p_RtsReasons(i):=R;
i:=i+1;
END LOOP;
END;

Loading ...