user2339851
user2339851

Reputation: 19

Linesize Issue Oracle 11g Express

Having an issue getting the SET LINESIZE to work correctly in Oracle 11g Express.

I set the linesize to anything from 100 to the max limit of 37000 odd but it's still not appearing correctly in the TUI.

I've tried every avenue that I can find on this here internet but ain't nothing working for me - can any of you fine works help me out?

I've included screengrab (EDIT: I don't have 'reputation so image won't display) of the result and the code of the table also.

CREATE table SUPERVISOR(
S_ID NUMBER(5) NOT NULL,
SFNAME NVARCHAR2(50) NULL,
SLNAME NVARCHAR2(50) NULL,
STELEPHONE NUMBER(9) NULL,
D_ID NUMBER(6) NULL,
PRIMARY KEY(S_ID),
FOREIGN KEY(D_ID)
REFERENCES DEPARTMENT(D_ID)
);

Upvotes: 1

Views: 2572

Answers (1)

Ed Gibbs
Ed Gibbs

Reputation: 26353

It's tough to tell without the screen grab, but in general the output in SQLPlus tends to wrap on the display. Try spooling to a file:

SQL> SET LINESIZE 100
SQL> SPOOL myresult.txt
SQL> ... (execute your DESC or query or whatever)
SQL> SPOOL OFF
SQL> EDIT myresult.txt

In Windows, the EDIT myresult.txt will generally bring up the spooled output in NotePad. Turn off word-wrapping (under the Format menu) and you should see your output at the proper width.

The spooled output will be padded to the exact length of your SET LINESIZE. To remove the padding, type SET TRIMSPOOL ON at the SQL prompt before you start spooling.


Addendum: Widening the SQLPlus window (Windows O/S)

To widen the SQLPlus window, click on the window menu (or type Alt+Space), select Properties, and go to the Layout tab. In the Screen Buffer Size section you can define the line width. This is for the window display, and it's independent of the SQLPlus SET LINESIZE setting.

You can also define the overall width in the Window Size, though there's an upper limit on that, probably based on your display. Click "OK" and you should be all set. The window will scroll horizontally out to the buffer size you've specified.

I'm sure similar things can be done on other O/S's, but I don't have any available to me at the moment.

Upvotes: 1

Related Questions