I have a function defined that returns a sys_refcursor containing 5 text columns. Sorry, I cannot post the contents of it here for business reasons. The columns are casted to varchar2 with specific widths (9,4,10,10,10). The casting allows me to ensure column widths are constant.
In SQL Developer 1.5, printing script output (using F5 from SQL worksheet) displays the contents of the cursor nicely as:
MY_FUNCTION(input1,input2,input3)
---------------------------------
COLUMN1 COLU COLUMN3 COLUMN4 COLUMN5
--------- ---- ---------- ---------- ----------
18-NOV-14 TEXT SOME_DATA1 SOME_DATA2 SOME_DATA3
18-NOV-14 TEXT SOME_DATA1 SOME_DATA2 SOME_DATA3
18-NOV-14 TEXT SOME_DATA1 SOME_DATA2 SOME_DATA3
18-NOV-14 TEXT SOME_DATA1 SOME_DATA2 SOME_DATA3
However, in SQL Developer 4.0, the output is wrapped (similar to linesize argument for SQLPlus) at the width of the function call:
MY_FUNCTION(input1,input2,input3)
---------------------------------
COLUMN1 COLU COLUMN3 COLUMN4
COLUMN5
--------- ---- ---------- -------
--- ----------
18-NOV-14 TEXT SOME_DATA1 SOME_DA
TA2 SOME_DATA3
18-NOV-14 TEXT SOME_DATA1 SOME_DA
TA2 SOME_DATA3
18-NOV-14 TEXT SOME_DATA1 SOME_DA
TA2 SOME_DATA3
18-NOV-14 TEXT SOME_DATA1 SOME_DA
TA2 SOME_DATA3
Database version is 11g. I have tried using the "set linesize 1000" command, but the output still wraps at the same length. However, setting linesize 5 will cause it to wrap at 5 characters.
Output appears normal in SQL*Plus without using any "set" commands.
Is there a way to prevent the wrapping of the cursor contents in 4.0?
See Question&Answers more detail:os