I've tried this, but it doesn't work:
col * format a20000
Do I really have to list every column specifically? That is a huge pain in the arse.
You can change the displayed width of a CHAR, VARCHAR2 (VARCHAR), LONG, DATE, or Trusted Oracle column by using the COLUMN command with a format model consisting of the letter A (for alphanumeric) followed by a number representing the width of the column in characters.
How do you format your SQL code in SQL Developer? You can press CTRL+F7 (on Windows) to format the SQL code in your current Code Editor window to update the formatting of the code based on any format changes you have made.
SQL*Plus COLUMN FORMAT is one of several commands that can alter the appearance of the output. SQL*Plus COLUMN FORMAT does not alter table structures; it only changes the format for the specified column. Normally, SQL*Plus commands, including COLUMN FORMAT, are only effective for the current session of SQL*Plus.
The PAGESIZE setting tells SQL*Plus the number of printed lines that will fit on one page of output.
Never mind, figured it out:
set wrap off set linesize 3000 -- (or to a sufficiently large value to hold your results page)
Which I found by:
show all
And looking for some option that seemed relevant.
I use a generic query I call "dump" (why? I don't know) that looks like this:
SET NEWPAGE NONE SET PAGESIZE 0 SET SPACE 0 SET LINESIZE 16000 SET ECHO OFF SET FEEDBACK OFF SET VERIFY OFF SET HEADING OFF SET TERMOUT OFF SET TRIMOUT ON SET TRIMSPOOL ON SET COLSEP | spool &1..txt @@&1 spool off exit
I then call SQL*Plus passing the actual SQL script I want to run as an argument:
sqlplus -S user/password@database @dump.sql my_real_query.sql
The result is written to a file
my_real_query.sql.txt
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With