Skip to content

Instantly share code, notes, and snippets.

@matejskubic
Created December 18, 2012 16:56
Show Gist options
  • Save matejskubic/4329694 to your computer and use it in GitHub Desktop.
Save matejskubic/4329694 to your computer and use it in GitHub Desktop.
oracle - result from table type function
DECLARE
tt PORTAL_INTRANET.T_GK_TABELA;
vv PORTAL_INTRANET.VRSTICA;
--define v_Return PORTAL_INTRANET.T_GK_TABELA;
BEGIN
tt := PORTAL_INTRANET.PKG_PODATKI_GK.F_GET_DATA_GK();
dbms_output.put_line('test_zacetek');
dbms_output.put_line('first:' || tt.first || ' count:' || tt.count || ' last:'||tt.last);
for i in tt.first .. tt.last loop
vv := tt(i);
dbms_output.put_line(vv.st_konta || ' ' || vv.st_temeljnice ||' ' || vv.datum_transakcije || ' ' || vv.opis_transakcije || ' ' || vv.prenos_ax_id );
exit when i > 5;
end loop;
dbms_output.put_line('test_konec');
--DBMS_OUTPUT.PUT_LINE(v_Return);
/* Legacy output:
DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
*/
--:v_Return := v_Return;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment