Created
November 20, 2015 15:09
-
-
Save asimmon/435acb8ec789cb6c1d3f to your computer and use it in GitHub Desktop.
SQL query results to CSV using cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
v_items_cursor SYS_REFCURSOR; | |
v_csv CLOB; | |
BEGIN | |
OPEN v_items_cursor FOR | |
SELECT * FROM items; | |
v_csv := cursor_to_csv(v_items_cursor); | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment