Skip to content

Instantly share code, notes, and snippets.

View Extract_Data.sql
Function Extract_Data(p_query Varchar2,
p_directory Varchar2,
p_filename Varchar2) Return Boolean is
CursorId Pls_Integer;
RowsFetched Pls_Integer;
ColCnt Pls_Integer;
RecLimit Pls_Integer := 1000; -- No. of Records processed per fetch
delimiter Char := Chr(9); -- Field Delimiter (Tab)
buffer Varchar2(32746);