Last active
October 4, 2016 16:32
-
-
Save jrwarwick/8dbb7ef0dd7592ccf939d7c6a2aa8dee to your computer and use it in GitHub Desktop.
Row generator targeting an output size if exported to CSV
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
| --Row generator query to give us a rougly n MB output to CSV, as specified in the first term of the connect by clause | |
| --thanks to excellent inspiration and resource from Natalka Roshak, https://blogs.oracle.com/sql/entry/row_generators_part_2 | |
| select level, rownum,'zero_one_two_three_four_five_six_seven_eight_nine_ten_eleven_twelve_thirteen_fourteen_fifteen' number_names ,1234567890 ten_digit_number --about 115 bytes per row once csv'd | |
| from dual | |
| connect by level <= ( 80 * (1048576 / 112)) | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment