Displaying output in SQLPlus
Not an Oracle/SQL*Plus problem. The default size of commandline window screen buffer is 300 (lines), and the maximum is 9999 (lines), so it is unable to display 157998 rows.

Better spool the output to a file:

SQL&gt; spool output.txt
SQL&gt; select ...
SQL&gt; spool off


After that you can view the result in the file output.txt